> ini konfigurasi squid saya dan hasil dari perintah > free > > root@MLB_server:~# free > total used free shared > buffers cached > Mem: 255324 250876 4448 0 > 62532 29884 > -/+ buffers/cache: 158460 96864 > Swap: 192740 131268 61472 ck.. usage swap sudah gilaan2.. 2/3 lebih swap partition sudah terpakai, sepertinya ada aplikasi yang leaked memory.
contoh di server saya, after 1 day from reboot.. ini server production saya.. [root@proxy /]# free total used free shared buffers cached Mem: 1555588 1512612 42976 19880 761092 56348 -/+ buffers/cache: 695172 860416 Swap: 1060208 0 1060208 output vmstat -n 1 bagaimana.. cukup disertakan +/- 10 baris.. > squid.conf > ------------- > cache_mem 200 MB > > cache_swap_low 90 > cache_swap_high 95 > maximum_object_size 4096 KB > minimum_object_size 0 KB > maximum_object_size_in_memory 8 KB > > cache_replacement_policy lru > memory_replacement_policy lru > > > # cache_dir > cache_dir ufs /cache1 8000 24 256 > cache_dir ufs /cache2 8050 24 256 > cache_dir ufs /cache3 10400 24 256 kalau saya jadi anda.. spek : RAM : 256 MB btw pake ram 512 mins donk 512 SDRAM PC133 just 61$ :P /*begin squid conf*/ cache_mem 24 MB cache_swap_low 80 cache_swap_high 100 maximum_object_size 4096 KB minimum_object_size 0 KB maximum_object_size_in_memory 8 KB cache_replacement_policy heap GDSF memory_replacement_policy heap GDSF /* why i choose GDSF */ # The heap GDSF policy optimizes object hit rate by keeping smaller # popular objects in cache so it has a better chance of getting a # hit. It achieves a lower byte hit rate than LFUDA though since # it evicts larger (possibly popular) objects. /* speeding user feeling about my system */ half_closed_clients off memory_pools_limit 32 MB cache_dir aufs /cache1 4000 16 256 cache_dir aufs /cache2 4000 16 256 cache_dir aufs /cache3 4000 16 256 cache_store_log none # disable store log client_persistent_connections on /* more than one request/connection */ server_persistent_connections on /* same as above but for squid comms */ pipeline_prefetch on # when configuring squid using this option.. before it.. export CFLAGS="-06 -s -DNUMTHREADS=24" download dlmalloc.c from ftp://g.oswego.edu/pub/misc/malloc.c copy malloc.c to squid_source_dir/lib/dlmalloc.c enlarge fd limit.. edit : /usr/include/bits/types.h change : #define __FD_SETSIZE 1024 ==> #define __FD_SETSIZE 8192 type.. ulimit -HSN 8192 truss ./configure --enable-dlmalloc --with-pthreads --enable-async-io=24 --enable-poll --enable-arp-acl --enable-snmp --enable-removal-policies --prefix=/usr --exec_prefix=/usr --bindir=/usr/sbin --libexecdir=/usr/lib/squid --localstatedir=/var --sysconfdir=/etc/squid --enable-kill-parent-hack make && make install abis itu edit file startup squid.. add ulimit -HSn 8192 sebelum startup squid dijalankan.. jgn lupa tambahkan ke rc.local atau ke /etc/sysctl.conf # Enables file max 8192 fs.file-max = 8192 # Enables inode max 65536 fs.inode-max = 65536 # optimize tcp/ip stack # Enables tcp syn backlog = 1024 net.ipv4.tcp_max_syn_backlog = 1024 # Enables ip_local_port_range = 1024 32768 net.ipv4.ip_local_port_range = 1024 32768 # change tcp_fin_timeout to 30 secs net.ipv4.tcp_fin_timeout = 30 # change keep alive time to 30 mins net.ipv4.tcp_fin_timeout = 1800 # disable tcp window scaling net.ipv4.tcp_window_scaling = 0 # disable tcp sack features net.ipv4.tcp_sack = 0 # disable tcp timestamps feature. net.ipv4.tcp_timestamps = 0 /* note ini cuman untuk 2.2 # Enlarge rmem_default net.core.rmem_default = 131072 # Enlarge rmem_max net.core.rmem_max = 131072 # Enlarge wmem_default net.core.wmem_default = 131072 # Enlarge wmem_max net.core.wmem_max = 131072 * end of note/ # adjust freepages allocation and bdflush behavior # because we're server, abd we have always a request to fill # for vm subsystem # Adjust freepages vm.freepages = 512 1024 2048 # Adjust bdflush vm.bdflush = 100 5000 640 256 150 30000 5000 1884 2 saya gunakan seperti diatas.. well, jika ada yamg butuh reasoning kenapa saya gunakan value2 diatas silahkan japri saya. regards Budi Aditya -- Utk berhenti langganan, kirim email ke [EMAIL PROTECTED] Informasi arsip di http://www.linux.or.id/milis.php3