Posted by sdudenhofer on December 12, 2008 at 2:02pm
My current website home, sometimes loads very, very, very slowly. I have rebooted my server once and it sped it up, but I am wondering about some best practices to optimize drupal performance on the backend. I have a lot of memory intensive modules, so I think that may have something to do with it.
I've been digging through the drupal planet trying to find anything, but wondered if anyone else has had any issues with slowness.

Comments
I know when I am running
I know when I am running Drupal on my home machine which doesn't have enough RAM it is very slow. My only guess is that is has something to do with available memory. You can also disable as many modules that you don't really need. There are also some load settings to turn off features when there is a large load on your site.
op-code cache
supposed to triple the speed of page loads. Also play with settings on mysql query cache. That's what I've read, I'm no expert.
An opcode cache can improve
An opcode cache can improve performance especially memory usage for each page request.
Drupal's caching
You probably know this, but Drupal has internal caching of CSS and Javascript to limit the number of HTTP requests for each page load.
-Mike Goodwin
Red Leaf Media
http://www.redleafmedia.com
A little more info on the server?
Hey Aaron, it could be a number of things. I'm not really clear on whether it is a physical server at home, or if it could be a virtual server hosted elsewhere. Virtual servers have relatively slow filesystems, so log files actually cause some serious slow-down, especially as they grow. If the file grows to some 100s of MBs, it will slow down considerably, and then once the cron runs and starts a new one, then the server responds better... until it slows down again. Restarts sometimes seem to help, but it is temporary. If you find this is the problem I can try to remember some tricks and config files to help with this.
MySQL access is important, so if the database is on a different server, then there will be speed issues. Caching helps here.
And, RAM, as already mentions plays a big part. So, check to see how much memory you're currently using (and which processes) when it slows down. Command-line top can help show that.
See you later!
Thanks Ray
Thanks for the input Ray! Just fyi.... this post was from the OTHER "dudenhofer" - i know, who'd have thought you'd have to worry about 2 people with that name! ha ha
Gotta watch out for that s
Hi Aaron, my bad. I've got to watch out for that sdude...
Clarification
My website is hosted on slicehost. It is running on 512 mb RAM. The mySQL database is located on the same host as the website.
I having my caching mode set to normal. Block cache is enabled. Optimize CSS and Javascript is enabled.
Freelancer
Twitter sdudenhofer
seth@osjournal.net
Log files
Hi Seth,
In case you're interested in checking out the log files, I'd recommend looking in these locations when you have a slow-down. The locations might be different depending on the version of linux you're running though, and if you're running virtual servers, how you have your logging setup, etc.
/home/username/logs
/var/log/
/var/log/apache
I'd look primarily at your access.log and error.log files, to see if they've grown very very large, but look for any large files in those locations. Also, make note of how often the log files are archived. Default might be weekly, I'd recommend daily... but you also want to check out the logs to see if there is anything you can do to minimize the entries. Non-existing files, like favicon.ico will put an error in the error.log file on every page access, for example.
Additionally, if you've added any system log files to /etc/syslog.conf, check to see if you put a - in front of the location... for example:
local4.* -/var/log/ldap.logwill make a huge difference from:
local4.* /var/log/ldap.logFrom the syslog.conf manpage:
You may prefix each entry with the minus ‘‘-’’ sign to omit syncing the file after every logging. Note that you might lose information if the system crashes right behind a write attempt. Nevertheless this might give you back some performance, especially if you run programs that use logging in a very verbose manner.I'm just guessing if this is related to your problem, but the idea is to be aware of log file syncing on a virtual server, since the disk I/O can be slower. In my case, the page access times would eventually mount to a couple minutes when I was developing a website using LDAP to manage the users, all because I didn't put the - in the syslog.conf file. Rebooting would seem to help, but only temporarily, and once the log files were rotated, it would be fast again until the log file size increased again. After I put the - in there, it was night and day.
To help locate the problem, you could do a "top d 5" from the shell to help you see whether it is memory-related, CPU, disk I/O, etc.
Good luck. I hope you find whatever the problem is.
Ray
Streaming Video?
Seth,
You and I use the same setup through Slicehost, and I've never run slowly. Do you think it has anything to do with the streaming video running on your main page?
-Brock Glaze
Video
Don't think its the video, it occurs when I am not on the main page.
Ray thanks for places to start. I checked top and the two highest memory consumers were mysql and init. I'm going to look at the database later to see if I can stream line it. I think I'm gonna check the memory I allocated to drupal as well to see if that is the problem.
Freelancer
Twitter sdudenhofer
seth@osjournal.net
rebuilt
I just totally wiped my drupal install and reinstalled version 6.8 from CVS. I'm trying to keep track of what modules I install, and noting the speed before and after I install a module. We will see where this takes me. I think this would be a great meeting topic, as you never know when you might have some backend drupal problems.
Freelancer
Twitter sdudenhofer
seth@osjournal.net