Grazie mille, ho installato xcache e modificato i files di configurazione come suggerito da Alex, sicuramente php è migliorato tantissimo arrivando a consumare poco o niente, anche mysql è migliorato anche se continua a consumare abbastanza, posto la configurazione di xcache che non sono sicuro sia ottimale visto è praticamente quella di default:
Codice:
extension=memcache.so
[memcache]
memcache.dbpath=/var/lib/memcache
memcache.maxreclevel=0
memcache.maxfiles=0
memcache.archivememlim=0
memcache.maxfilesize=0
memcache.maxratio=0
[xcache-common]
;; install as zend extension (recommended), normally "$extension_dir/xcache.so"
zend_extension = /usr/lib/php5/20060613+lfs/xcache.so
; zend_extension_ts = /usr/local/lib/php/extensions/non-debug-zts-xxx/xcache.so
;; For windows users, replace xcache.so with php_xcache.dll
;zend_extension_ts = c:/php/extensions/php_xcache.dll
;; or install as extension, make sure your extension_dir setting is correct
; extension = xcache.so
;; or win32:
; extension = php_xcache.dll
[xcache.admin]
xcache.admin.auth = On
xcache.admin.user = "mOo"
; xcache.admin.pass = md5($your_password)
xcache.admin.pass = ""
[xcache]
; ini only settings, all the values here is default unless explained
; select low level shm/allocator scheme implemenation
xcache.shm_scheme = "mmap"
; to disable: xcache.size=0
; to enable : xcache.size=64M etc (any size > 0) and your system mmap allows
xcache.size = 64M
; set to cpu count (cat /proc/cpuinfo |grep -c processor)
xcache.count = 1
; just a hash hints, you can always store count(items) > slots
xcache.slots = 8K
; ttl of the cache item, 0=forever
xcache.ttl = 0
; interval of gc scanning expired items, 0=no scan, other values is in seconds
xcache.gc_interval = 0
; same as aboves but for variable cache
xcache.var_size = 64M
xcache.var_count = 1
xcache.var_slots = 8K
; default ttl
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300
xcache.test = Off
; N/A for /dev/zero
xcache.readonly_protection = Off
; for *nix, xcache.mmap_path is a file path, not directory.
; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection
; 2 group of php won't share the same /tmp/xcache
; for win32, xcache.mmap_path=anonymous map name, not file path
xcache.mmap_path = "/dev/zero"
; leave it blank(disabled) or "/tmp/phpcore/"
; make sure it's writable by php (without checking open_basedir)
xcache.coredump_directory = ""
; per request settings
xcache.cacher = On
xcache.stat = On
xcache.optimizer = Off
[xcache.coverager]
; per request settings
; enable coverage data collecting for xcache.coveragedump_directory and xcache_coverager_start/stop/get/clean() functions (will hurt ex$
xcache.coverager = Off
; ini only settings
; make sure it's readable (care open_basedir) by coverage viewer script
; requires xcache.coverager=On
xcache.coveragedump_directory = ""
Ecco i valori rossi della schermata di phpmyadmin:
Codice:
Handler_read_rnd 26 k
Handler_read_rnd_next 240 M
Created_tmp_disk_tables 936
Select_full_join 78
Select_range_check 2
Sort_merge_passes 1
Opened_tables 779
Table_locks_waited 730
Ed infine un top appena fatto con circa 250 utenti online:
Codice:
top - 14:49:06 up 1:01, 2 users, load average: 1.81, 1.46, 1.59
Tasks: 105 total, 1 running, 104 sleeping, 0 stopped, 0 zombie
Cpu(s): 14.2%us, 6.5%sy, 0.0%ni, 77.6%id, 1.0%wa, 0.3%hi, 0.3%si, 0.0%st
Mem: 4086120k total, 648564k used, 3437556k free, 38520k buffers
Swap: 2104504k total, 0k used, 2104504k free, 449736k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
8710 mysql 10 -5 210m 41m 4712 S 24 1.0 8:12.48 mysqld
8173 www-data 16 0 161m 24m 19m S 7 0.6 0:44.05 php5-cgi
8170 www-data 16 0 161m 27m 21m S 5 0.7 0:42.22 php5-cgi
8169 www-data 19 0 161m 24m 19m S 2 0.6 0:43.83 php5-cgi
8161 www-data 15 0 7344 4748 832 S 1 0.1 0:26.71 lighttpd
8168 www-data 16 0 161m 23m 18m S 1 0.6 0:42.99 php5-cgi
2730 root 16 0 2228 1144 856 S 0 0.0 0:05.10 top
8186 www-data 16 0 161m 22m 17m S 0 0.6 0:41.67 php5-cgi
9104 root 15 0 2228 1152 856 R 0 0.0 0:00.03 top
1 root 15 0 1948 640 544 S 0 0.0 0:01.49 init
2 root RT 0 0 0 0 S 0 0.0 0:00.00 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.00 migration/1
5 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/1
6 root 10 -5 0 0 0 S 0 0.0 0:00.87 events/0
7 root 10 -5 0 0 0 S 0 0.0 0:00.78 events/1
8 root 10 -5 0 0 0 S 0 0.0 0:00.00 khelper
9 root 10 -5 0 0 0 S 0 0.0 0:00.00 kthread
13 root 10 -5 0 0 0 S 0 0.0 0:00.01 kblockd/0
14 root 10 -5 0 0 0 S 0 0.0 0:00.01 kblockd/1
29 root 10 -5 0 0 0 S 0 0.0 0:00.00 kseriod
103 root 16 0 0 0 0 S 0 0.0 0:00.00 pdflush
104 root 15 0 0 0 0 S 0 0.0 0:00.04 pdflush
105 root 11 -5 0 0 0 S 0 0.0 0:00.00 kswapd0
106 root 12 -5 0 0 0 S 0 0.0 0:00.00 aio/0
107 root 11 -5 0 0 0 S 0 0.0 0:00.00 aio/1
256 root 15 0 0 0 0 S 0 0.0 0:00.00 kirqd
355 root 16 -5 0 0 0 S 0 0.0 0:00.00 xfslogd/0
356 root 16 -5 0 0 0 S 0 0.0 0:00.00 xfslogd/1
357 root 16 -5 0 0 0 S 0 0.0 0:00.00 xfsdatad/0
358 root 16 -5 0 0 0 S 0 0.0 0:00.00 xfsdatad/1
380 root 20 -5 0 0 0 S 0 0.0 0:00.00 ata/0
381 root 20 -5 0 0 0 S 0 0.0 0:00.00 ata/1
382 root 20 -5 0 0 0 S 0 0.0 0:00.00 ata_aux
403 root 15 -5 0 0 0 S 0 0.0 0:00.01 scsi_eh_0
404 root 11 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_1
409 root 10 -5 0 0 0 S 0 0.0 0:00.01 scsi_eh_2
410 root 10 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_3
826 root 10 -5 0 0 0 S 0 0.0 0:00.00 khubd
1152 root 10 -5 0 0 0 S 0 0.0 0:01.34 kjournald
1329 root 16 -4 2180 620 356 S 0 0.0 0:00.15 udevd
1664 root 12 -5 0 0 0 S 0 0.0 0:00.00 kpsmoused
1833 root 13 -5 0 0 0 S 0 0.0 0:00.00 kmirrord
2174 root 17 0 1624 568 460 S 0 0.0 0:00.12 syslogd
2180 root 15 0 1576 376 308 S 0 0.0 0:00.00 klogd
2289 root 22 0 1752 400 320 S 0 0.0 0:00.00 courierlogger
2290 root 24 0 1908 596 476 S 0 0.0 0:00.00 authdaemond
Comunque adesso le queries per second sono 156.06
Grazie ancora, se passate da Milano fatemelo sapere che come minimo vi devo offrire la cena
Segnalibri