Mar
14
Big Board Admins (and eva): Optimisation Advice needed
Written by
jane
Also we've been benchmarking the new server and we keep getting high server loads every time we hit the server with new requests, eg:
top - 14:46:43 up 1 day, 4:55, 3 users, load average: 5.83, 1.53, 1.05
Tasks: 112 total, 19 running, 93 sleeping, 0 stopped, 0 zombie
Cpu(s): 74.2% us, 16.1% sy, 0.0% ni, 0.1% id, 0.0% wa, 0.0% hi, 9.7% si
Mem: 2058348k total, 1906296k used, 152052k free, 141836k buffers
Swap: 2040244k total, 144k used, 2040100k free, 1307040k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5198 gkrellmd 18 0 19756 1232 992 R 37 0.1 78:17.18 gkrellmd
17243 cos 16 0 113m 8720 5140 R 25 0.4 0:07.39 php-cgi
17245 cos 16 0 113m 8060 5140 R 24 0.4 0:07.60 php-cgi
17240 cos 16 0 113m 8284 5284 R 23 0.4 0:07.23 php-cgi
17235 cos 16 0 113m 8408 5208 R 22 0.4 0:07.22 php-cgi
17238 cos 15 0 113m 8316 5196 R 22 0.4 0:07.48 php-cgi
17248 cos 16 0 113m 8100 5184 R 22 0.4 0:07.48 php-cgi
17241 cos 16 0 113m 8272 5124 R 22 0.4 0:07.16 php-cgi
17233 cos 16 0 114m 10m 7168 R 21 0.5 0:07.53 php-cgi
17234 cos 16 0 113m 9020 5784 R 21 0.4 0:06.86 php-cgi
17236 cos 16 0 113m 8384 5168 R 21 0.4 0:07.71 php-cgi
17244 cos 16 0 113m 8088 5156 R 21 0.4 0:07.40 php-cgi
17246 cos 16 0 113m 8100 5184 S 21 0.4 0:07.31 php-cgi
17247 cos 16 0 113m 8272 5124 R 20 0.4 0:07.14 php-cgi
17237 cos 16 0 113m 10m 7396 R 20 0.5 0:07.42 php-cgi
17242 cos 16 0 113m 8068 5140 R 19 0.4 0:07.37 php-cgi
17239 cos 16 0 115m 9.9m 5140 R 19 0.5 0:07.23 php-cgi
17253 root 16 0 61924 3072 952 R 9 0.1 0:02.88 lighttpd
7752 mysql 16 0 699m 115m 3432 S 7 5.8 0:25.14 mysqld
17200 root 16 0 6152 1008 756 R 1 0.0 0:00.31 top
1 root 16 0 4748 544 460 S 0 0.0 0:07.60 init
2 root RT 0 0 0 0 S 0 0.0 0:00.60 migration/0
3 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/0
4 root RT 0 0 0 0 S 0 0.0 0:00.21 migration/1
5 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/1
6 root RT 0 0 0 0 S 0 0.0 0:00.21 migration/2
7 root 34 19 0 0 0 S 0 0.0 0:00.01 ksoftirqd/2
8 root RT 0 0 0 0 S 0 0.0 0:00.31 migration/3
9 root 34 19 0 0 0 S 0 0.0 0:00.02 ksoftirqd/3
10 root 5 -10 0 0 0 S 0 0.0 0:00.01 events/0
11 root 5 -10 0 0 0 S 0 0.0 0:00.03 events/1
12 root 5 -10 0 0 0 S 0 0.0 0:00.02 events/2
We know where the issue is... its with lighttpd and the way it handles php processes (note number 12 in the attached file) I'm just not quite sure how we can fix that.
Thanks :)
It's probably more efficient to use the fastcgi.server directive (from mod_fastcgi) instead to establish a connection between Lighty and PHP.
1. Upgrade MySQL server to 4.1.22
2. Edit /etc/my.cnf and place the following mysql server settings in /etc/my.cnf and restart mysql server afterwards
[mysqld]
datadir=/cosmysql/mysql
skip-networking
tmpdir = /cosmysql/tmp
safe-show-database
old_passwords
back_log = 75
skip-innodb
max_connections = 500
key_buffer = 80M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 3M
table_cache = 2000
thread_cache_size = 384
wait_timeout = 15
connect_timeout = 10
tmp_table_size = 128M
max_heap_table_size = 128M
max_allowed_packet = 64M
max_connect_errors = 10
thread_concurrency = 8
read_rnd_buffer_size = 524288
bulk_insert_buffer_size = 8M
query_cache_limit = 3M
query_cache_size = 64M
query_cache_type = 1
query_prealloc_size = 131072
query_alloc_block_size = 65536
default-storage-engine = MyISAM
[mysqld_safe]
nice = -5
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M
[mysqlhotcopy]
interactive-timeout
3. Install Xcache - http://www.vbulletin.com/forum/showthread.php?t=213267
4. If you just upgraded to vB 3.5.x/3.6.x try to disable these 4 options:
Admin CP -> vBulletin Options -> Forums Home Page Options -> Display Logged in Users?
Admin CP -> vBulletin Options -> Forum Display Options (forumdisplay) -> Show Users Browsing Forums
Admin CP -> vBulletin Options -> Thread Display Options -> Show Users Browsing Thread
Admin CP -> vBulletin Options -> Message Searching Options -> Automatic Similar Thread search
We have a single server. :)
Any tips for tuning MySQL? Is the my.cnf configs good enough for this server?
Thanks
Please attach the full lighttpd.conf file.
#If you have any other info about this subject , Please add it free.# |