Drupal development: performance - performance

as the single user / developer on a drupal website im experience serious performance problems. several issues occur:
usually i develop drupal on our company dev server but now im at a client's office. the IT guys installed a VM with WAMP on the server they usually use for .net development. on the first day of dev (installing drupal, required modules and configuring them) httpd.exe would max out the cpu and loading any page would take minutes. IT guys just scratch their heads.
i then just installed WAMP on the local machine they gave me: some 299,99 Win XP Dell piece of sh*t, nevertheless a P4 2.8Ghz 2GB Ram. the fan blows so loud the entire office is giving me dirty looks. Again httpd.exe maxes out. again, any page (esp admin ones) takes minutes to load
in firefox, the views UI is completely unworkable. alot of stuff is loaded with ajax and it again takes minutes to see the various html elements dynamically inserted in the UI to appear - try to imagine this.
Chrome seems to handle the JS a bit better but it still takes way too long to complete any kind of action.
the devel_themer module ads tons of markup to the page which leads to "Allowed memory size of X exhausted" errors (memory_limit = 128MB ).
now im at the themeing stage where i need to do a LOT of page refreshes. I NEED firebug which requires firefox which in its turn eats up CPU and RAM. What usually takes seconds now takes minutes and by the time whatever action is completed, i forgot what i was doing. im basically reading news stories in between every page reload.
now, i know drupal is resource intensive but that its impossible to develop on a typical Dell / Win XP machine is a bit much, no? at home i work on an iMac and everything runs silky smooth.
i cant imagine im the only guy with this problem since what im doing is basically drupal 101 (no custom modules so far ...). unless someone can offer a solution, im concluding that you basically can not develop a typical drupal site on a normal home desktop computer.
what gives?

So you have abandoned the VM,check you php.ini file for the memory limit, increase it and see if there is a performance boost. its usually set to a default of 16M.
HTH

I'd suggest you either make sure to spend some time actually tuning your XP system, because the default WAMP config is definitely suboptimal, or consider an alternative, like Zend Server community edition (ZCE). Although not completely free as in speech, it is free as in beer, and simply builds up on top of a better default config for Apache and MySQL.
Although less convenient than WAMP or ZCE since not bundled, a manual install of Apache 2.2 is also usually a good choice.
Also note that, that the way devel_themer works, it is constantly building files in your temp directory, meaning that unless that directory is cleaned regularly, files will accumulate and directory browses will become exceedingly slow. Only a cron.php run will cause drupal to clean those files, for an up-to-date version of devel. See my patch adding this cleanup at http://drupal.org/node/303443
Finally, you mention Firebug, and you might be using the Drupal for Firebug module, which has known performance issues, apparently related to infinite recursion in some cases; although recent versions are supposed to fix this problem. See for instance http://drupal.org/node/303443

A couple things I've run into that could potentially help.
Unless you actually need it, turn off Locale. It causes a ton of extra queries (at least the last time I looked into it, this may have changed) so if you're not using it then don't put the unnecessary load on your DB.
Just like on a regular development machine, make sure MySQL is properly tuned and configured. This goes for any setup; local, development or production. 3/4 of the time the database is the bottleneck so start there.
If you've got the devel module installed and enabled it should have a query log you can tell it to output at the bottom of the page, this should help you with number 2.

Related

Website running slow in IE with no specific reason why

We have a website that a few people are complaining about it running extremely slow. We're struggling to figure out why and to even recreate it. Most are mentioning that it's running slow in IE.
It's not limited to any specific section of the site, just the whole thing in general.
There's been several developers creating/adjusting the code so it's overly bloated but we can't see any specific reason why this should happen.
Can anyone see why?
We've also run a speed test:
I was running a profiling test with IE on your website and there is a call to:
http://www.playforce.co.uk/-ms-transform.htc
Which is giving error 404 not found and taking 1 second to complete (0.91 sec).
If is found all around your css under this line:
behavior:url(-ms-transform.htc);
Am no expert !! Am welcome to better suggestion and corrections of what i am about to say
You can try using a trial version of Borland Silk meter ..
They tend to measure the speed with which each element loads using various browsers and various geographical locations which are configurable by you.
Also , since only some of the user's are complaining about the speed being an issue you should also check the speed of their internet and their browser version and other addon etc of those users. Because sometimes the problem is not only with the server .
Try the above tool to confirm nothing is wrong in your server and then proceed to checking the client's browser and network.

Monitoring Hosting Performance

I've been building a site, running Wordpress 3.2.1 and noticed
the performance is sluggish in the front and back end.
I believe the problem is hosting specific.
The problem seems to be the connection loading the actual HTML
which is taking about 5.5 seconds. It appears to finish after
about 500ms, but does not stop loading for 3-4 more seconds.
Here is the development URL:
http://d1001488.u57.ukisp.com/dev/
Hosting:
Windows NT
PHP Version 5.2.10
There are a couple of jQuery select boxes that get
replaced and styled onload (in the footer), these take a
long time to get replaced after the page fully loads.
The hosts are claiming all is running properly. Is there
any thing I can try and tweak or monitor to see what
is going on? Or any suggestions?
Thanks.
For largely extrinsic causes, try YSlow. This will identify a number of things you can work on. It won't tell you anything about the internal behavior of your server, but it may help you narrow down what's going on.
The problem may be a specific plugin. Here's what I would recommend:
Try going through each plugin, deactivating it, and see if that makes your site load faster. Do this for each plugin, and if a deactivated plugin doesn't improve performance then just reactivate it and move to the next one.
Try temporarily activating the default Twenty Eleven theme. See if the default theme loads faster. If it does, then we can look at your custom theme.
These two things may help narrow down at least where the problem is coming from. Let me know how it goes!
Do you have CPanel access with your hosting account? If you do, look in the left side toolbar at the bottom you should see where it says server status (click to view) you will see various details about your server performance.

Editing content-types in Drupal at development mode takes for ever

While the site is in development mode, it takes for ever to edit content types and do various similar administrative tasks.
Is there a way to speed this up? What kind of hardware would I need?
Any specific MySQL optimization maybe?
Are you working on a local dev environment? That makes a huge difference. You shouldn't really need any big hardware as long as you're local. A new-ish $300 laptop with 4GB of RAM works fine for me.
However, no matter what you do, it's a lot of clicking, so the more you can learn to do that kind of stuff with code, the more efficient you can get.
This might help:
http://drupal.org/node/381668
Disable query log on all admin pages.
The devel module with performance logging is a great place to start to see where the problem is. You can see how many queries are being run per page and how long they take.
In my own experience of running Drupal on a netbook, the database was pretty insignificant in contributing to the page load times. The database was in fact considerably faster on my local machine than on the shared hosting environment I started out with (50-100ms vs. 1000-1500ms, as I recall). Due to the lack of processing power of the Atom CPU however, page loading times were about the same (~2-4 seconds).
If you're using something like XAMPP on a local machine, the default configuration is pretty lean. There are included configurations for larger servers, but beware of turning on the binary log.
Turning on the query cache can also be helpful, but to what degree is variable. It's the biggest boost for complex, often repeated queries; Drupal has some complex queries, but there is more so a lot of pretty simple ones. When you're developing you'll probably also invalidate the cache frequently. Regardless, on a local machine there isn't really any downside to enabling it other than some extra RAM usage. 32 MB could be quite reasonable to work with; I use more because I know I have plenty of available (even on a netbook).
Enabling a PHP opcode cache may also provide a boost in serving pages from your local machine. XAMPP includes the eAccelerator extension, though I would pick APC instead for a linux system.
The only other suggestions I have are trying to reduce the number of clicks you have to perform by using modules like Administration Menu, and make sure you're using a fast browser (e.g., firefox or chrome) since many of the administration pages use javascript.

Terrible DotNetNuke performance

I'm involved with a project using DotNetNuke version 05.01.04 Community Edition. We are building our new Intranet using it, but performance is terrible.
We have five people adding pages and content to it and every 15-30 seconds they experience a pause of 10 seconds or longer before the system continues and the next screens loads.
The server is Windows 2003, 3.8GHz with 1GB of RAM. I'm told by our server admin that the CPU and memory performance don't appear to be the bottleneck.
We currently have 350 pages in the system, we a plan to add 1000. So we need to resolve this performance problem so that we can enter content and so we can go live.
I just can't see where the bottleneck is. Is there a good why to determine the bottleneck when using DotNetNuke?
Modules installed
Publish:Engage (Not currently in
use)
Page Blaster (Doesn't appear
to providing caching when users
logged in using Integrated
Authentication)
SimpleGallery
XMod
Content Manager
IIS Setup
Application recycling completely disabled (Apart from a 2am recycle)
New findings: 18th March 2010
The main bottleneck was due to version 5.1.4 having a bug which caused 1300 database roundtrips on an average page, due to broken database in-memory caching. We've upgraded to 5.2.4 which has resolved this bottleneck.
Now the next biggest bottleneck is the navigation. We've used both DDR:Menu and DDN:Nav, but both have a major impact on performance.
Is there a navigation interface out there that doesn't drain performance so badly?
I think you need to start investigating this using performance profiling tools. For the DNN application itself I'd grab something like JetBrains DotTrace or Red Gate's ANTS Performance Profiler.
For the database SQL Server Profiler would be the first choice or a tool such as Red Gate's SQL Response.
Without profiling the application these you're going to be pulling at straws.
And as Tim pointed out in his comment, installing Firebug in Firefox with the YSlow add-in to see what resources are taking longest to serve to the browser.
Mitchel Sellers has some good tutorials and checklists to go through with regards to performance in DNN. Start with Explaining High Performance DotNetNuke Configuration and Management (which points to some of his earlier articles).
I have several years of dnn development and maintainance experience, when I have this kind of problem, I start doing things from database clean up. Next thing is, find for missing indexes, and/or rebuild all the indexes periodically (sql job scheduled for that) but major performance gain would be from clean up of table
Another good considerations would be, disabling trace, debug mode to false and turn off features of dnn that you don't use (scheduler is the first one to turn off)
Edit: consider keep alive as well
Hope this helps
Is your database on that server? If so, just throw in some more RAM, or get a faster disk array...
Have you considered creating this lot of pages directly through TSQL? It's not hard to do and may save you a lot of time.

IIS5, 6, and 7 Speed Issues After Upgrade

I will apologize in advance as this post is born out of severe frustration.
I have a classic asp website that has been running on Windows 2000/IIS5 for years, and another ASP.NET 2.0 site that we've recently started running on the same servers. So far, everything is running well.
Last year, I tried upgrading (fresh install) to Windows 2003/IIS6. The classic ASP site was much slower, about 50% slower based on logs/stats averaged over weeks of use. I tried everything to find out what was slow. Network tweaks. Integrated. Classic iis5 mode. In process. Out of process. Nothing ever made things better and I soon rolled back to IIS5/2000. The very day rolled back, performance went right back to where it was. This happened on more than one server. Eventually, I gave up and chalked it up to 2003 TCP issues of some sort.
I recently installed a Windows 2008/IIS server on a similar, but more powerful machine in hopes that things were better. Much to my happiness, my ASP classic app is faster under Windows 2008. Unfortunately, my ASP.NET app is 50-75% slower for now apparent reason. All of it's content loads. It's on the same network as the 2000 machine. The site was copied directly from the other machine, and it's a precompile web app from studio 2005.
While the page does hit the database and another server for initial data, it caches it from there for quite a while, it also uses the same db servers as the classic site, which is fast, so I know it's not necessarily a connection issue.
I've tried the default app pool and the classic .NET pool Made no difference. Upped./check the max threads, max per cpu in all the usual locations, web garen or no nothing seems to matter. I've double checked that the compilation debug=false is still set in the web.config.
For a quick benchmark, I used ab.exe (Apache Bench) to send 10 request, 1 at a time. Even if I use IE or Firefox to hit the site, it's clearly slower than under 2000, even according to firebug.
At this point, I'm frustrated and at a complete loss as to where to start. Has anyone been through this sort of mess before?
Speed depends on many factors. You do need to measure performance just on the server to understand if this is server issue. Enable tracing for your web site in web config and see which part/function is slowing it down. You can add you own tracing after each operation to see which block of code is slowest. I'm sure you will find things that you can improve/optimize once you which part of the page is the slowest.
In my case, the answer turned out to be simple one I fired up WireShark. There was 1 external resource request that could not be resolved since the test machine had no direct access to the internet like the live machine did.
It's always the little things.

Resources