เครื่องมันกระตุกๆครับ เข้า ssh ช้าเลย ในเกมส์ก็เลยกระตุกตาม
เว็บฝากรูปวันนี้คนเข้าเยอะ ตั้งแต่เที่ยงคืน ถึง 11โมงครึ่งนี้ 3,400ipแล้ว
จูนไม่รู้จะจูนยังไงละจ้า mod_expires ก็แล้ว Xcache ก็แล้ว
IO ก็ไม่สูง loadก็ไม่สูงมาก รบกวนด้วยครับ กระตุกบ่อยๆค่อยๆจะชินแล้ว เริ่มไม่เครียดแล้ว -*-
ไม่อยากไปใช้พวก nginx lighttpd เคยจ้างคนมาทำแล้วเค้าบอกไม่ได้ เครื่องมีหลายเว็บ
top - 11:14:51 up 13 days, 23:50, 2 users, load average: 0.17, 0.20, 0.14
Tasks: 451 total, 1 running, 450 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.7%us, 0.7%sy, 0.0%ni, 98.4%id, 0.0%wa, 0.1%hi, 0.2%si, 0.0%st
Mem: 4028476k total, 3880176k used, 148300k free, 87184k buffers
Swap: 5341176k total, 108k used, 5341068k free, 3144180k cached
----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read writ| recv send| in out | int csw
1 0 99 0 0 0| 0 0 | 92k 2381k| 0 0 |2558 890
0 0 99 0 0 0| 0 808k| 80k 1930k| 0 0 |2372 818
1 0 100 0 0 0| 0 0 | 73k 1973k| 0 0 |2376 771
0 0 99 0 0 0| 0 0 | 78k 2169k| 0 0 |2393 711
0 1 99 0 0 0| 0 776k| 84k 2436k| 0 0 |2605 873
0 0 99 0 0 0| 0 0 | 88k 2014k| 0 0 |2430 847
0 0 99 0 0 0| 0 568k| 75k 2068k| 0 0 |2355 763
1 0 99 0 0 0| 0 0 | 68k 1892k| 0 0 |2255 713
0 0 99 0 0 0| 0 0 | 74k 1742k| 0 0 |2277 679
1 0 99 0 0 0| 0 0 | 76k 1912k| 0 0 |2374 760
0 0 98 0 0 1| 0 0 | 95k 2730k| 0 0 |2749 1001
1 1 99 0 0 0| 0 1112k| 94k 2586k| 0 0 |2688 959
1 1 99 0 0 0| 0 0 | 109k 2810k| 0 0 |2760 1010
0 0 99 0 0 0| 0 976k| 79k 1936k| 0 0 |2554 751
2 2 95 0 0 0| 0 72k| 96k 2327k| 0 0 |2628 1056
0 0 99 0 0 0| 0 0 | 100k 2709k| 0 0 |2697 1018
1 0 99 0 0 0| 0 576k| 73k 1781k| 0 0 |2374 888
0 0 99 0 0 0| 0 0 | 57k 1345k| 0 0 |2141 714
0 0 99 0 0 0| 0 0 | 77k 1761k| 0 0 |2321 752
อันนี้พวกคอนฟิคที่เซทไว้จ้า
StartServers 5
MinSpareServers 5
MaxSpareServers 10
ServerLimit 300
MaxClients 300
MaxRequestsPerChild 0
Timeout 60
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 1
[php.ini]
memory_limit = 256M ;
zend_extension =/usr/local/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
;zend_extension=/usr/local/lib/ZendOptimizer_5.2.so
xcache.size = 128M
xcache.count = 4
xcache.slots = 16K
xcache.ttl = 0
xcache.gc_interval = 0
xcache.var_size = 8M
xcache.var_count = 4
xcache.var_slots = 8K
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300
xcache.cacher = On
xcache.stat = On
xcache.optimizer = Off
อันนี้ code ที่ใช้เรียกรูป
<?php
$id = substr($_SERVER['REQUEST_URI'],+8);
if (isset($id{19})) {
$id = substr($id,+1);
header ('Content-Type: image/png');
if (!file_exists('/xxx/thumb/'.$id)) {
readfile('images/error.png');
}else readfile('/xxx/thumb/'.$id);
exit();
} else {
header ('Content-Type: image/png');
if (!file_exists('/xxx/full/'.$id) or !$id) {
readfile('images/error.png');
}else {
readfile('/xxx/full/'.$id);
}
exit();
}
?>