I have a vb 3.8.4 forum and a drupal pressflow 6.22 site on together on my hosting server
When i added the drupal site to the server I had a lot of performance problems in the server
And sometimes it made the server go down
Here is the host server specifications :
- Operating system CentOS Linux 5.5
- Webmin version 1.560
- Kernel and CPU Linux 2.6.18-194.26.1.el5 on x86_64 Processor information Intel(R) Pentium(R) Dual CPU E2160 @ 1.80GHz, 2 cores
- Real memory 3.74 GB total, 2.35 GB used Virtual memory 4 GB total, 124 kB used
- Local disk space 1.76 TB total, 147.63 GB used
Here is the basic apache setting :
- Apache MPM Prefork
- HostnameLookups Off
- AllowOverride None
- MaxClients 100
- ThreadsPerChild 25
- StartServers 8
- MaxRequestsPerChild 4000
- mod_deflate is enabled
- mod_expires is enabled
Here is the basic php.ini settings:
- safe_mode = on
- max_execution_time = 1200
- max_input_time = 1200
- memory_limit = 1500M
Here is the mysql settings :
- max_allowed_packet=3G
- max_connections=200
- wait_timeout=30
- thread_cache=50
- connect_timeout=30
- query_cache_limit=1M
- interactive_timeout=30
Here is the top
cpu command result:
Here is the free -m
and iostat
commands result:
Here is the mysqladmin -u root -p ext -ri 30 | grep tmp_disk_tables
command result:
- | Created_tmp_disk_tables | 1771 |
- | Created_tmp_disk_tables | 2 |
- | Created_tmp_disk_tables | 5 |
- | Created_tmp_disk_tables | 3 |
- | Created_tmp_disk_tables | 7 |
- | Created_tmp_disk_tables | 0 |
We installed : ffmpeg,gd libraries and zend optimizer
The cpu load average is always above 3
So anyone can help me with this ?
If you need any additional necessary information just ask in comments ?
You have a 3.5 GB memory limit (
memory_limit = 3500M
), and are potentially starting 256 servers (MaxClients 256
). This brings your total potential memory consumption to just under 900 GB. Unless you have that much RAM in the box, chances are good you're swapping, and that's what's causing your performance degradation.You need to drastically dial back both of these numbers. I've never seen a 3.5 GB memory limit in half a decade of supporting Drupal. If you have an occasional task that requires a limit that high, it should probably be run on the command line, with
drush
, rather than through Apache.What's the output of
free -m
? What aboutiostat
(yum install sysstat
if you don't have it)?Some process is eating your CPU. To find what, do the following:
Check which process is consuming your cpu and or check how to deal with it, or post it here on the comments.
Drupal is highly relational. One thing that's common with it is the creation of temporary tables on disk. You want to minimize this if you can by optimizing the queries or putting the MySQL tmpdir on a RAM disk if you have to.
Run this:
First entry will tell you how many temporary tables were created on disk since last restart; after that how many were created during 30 second windows until you Ctrl-C out of it.
You also didn't say whether your Drupal tables were InnoDB or MyISAM in terms of MySQL configuration advice. In Drupal 6 it defaults to MyISAM.