Hi! Today i'm running squid 2.6 stable18 on FreeBSD 6.3 in a Acer R710 Server. Client have 3000 users But performance is poor. Consults has the method to be allowed to improve? My hardware is: CPU: Intel(R) Xeon(TM) CPU 3.20GHz *2 RAM: 4G HD: SEAGATE ST373207LC * 4 (320M/s 10000 RPM) #uname -a proxy4 -joejoe-:uname -a FreeBSD proxy4.tw 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #1: Sat Nov 17 11:45:41 CST 2007 root@xxxxxxxxx:/usr/obj/usr/src/sys/PROXY i386 #mount /dev/da0s1a on / (ufs, local) devfs on /dev (devfs, local) /dev/da0s1f on /squidlogs (ufs, local, soft-updates) /dev/da0s1d on /usr (ufs, local, soft-updates) /dev/da0s1e on /var (ufs, local, soft-updates) /dev/da0s1g on /tmp (ufs, local, soft-updates) /dev/da1s1d on /bcache1 (ufs, local, noatime, soft-updates) /dev/da1s1e on /bcache2 (ufs, local, noatime, soft-updates) /dev/da1s2d on /bcache3 (ufs, local, noatime, soft-updates) /dev/da1s2e on /bcache4 (ufs, local, noatime, soft-updates) /dev/da1s3d on /bcache5 (ufs, local, noatime, soft-updates) /dev/da1s3e on /bcache6 (ufs, local, noatime, soft-updates) /dev/da1s4d on /bcache7 (ufs, local, noatime, soft-updates) /dev/da1s4e on /bcache8 (ufs, local, noatime, soft-updates) /dev/da2s1d on /ccache1 (ufs, local, noatime, soft-updates) /dev/da2s1e on /ccache2 (ufs, local, noatime, soft-updates) /dev/da2s2d on /ccache3 (ufs, local, noatime, soft-updates) /dev/da2s2e on /ccache4 (ufs, local, noatime, soft-updates) /dev/da2s3d on /ccache5 (ufs, local, noatime, soft-updates) /dev/da2s3e on /ccache6 (ufs, local, noatime, soft-updates) /dev/da2s4d on /ccache7 (ufs, local, noatime, soft-updates) /dev/da2s4e on /ccache8 (ufs, local, noatime, soft-updates) /dev/da3s1d on /dcache1 (ufs, local, noatime, soft-updates) /dev/da3s1e on /dcache2 (ufs, local, noatime, soft-updates) /dev/da3s2d on /dcache3 (ufs, local, noatime, soft-updates) /dev/da3s2e on /dcache4 (ufs, local, noatime, soft-updates) /dev/da3s3d on /dcache5 (ufs, local, noatime, soft-updates) /dev/da3s3e on /dcache6 (ufs, local, noatime, soft-updates) /dev/da3s4d on /dcache7 (ufs, local, noatime, soft-updates) /dev/da3s4e on /dcache8 (ufs, local, noatime, soft-updates) #df -h Filesystem Size Used Avail Capacity Mounted on /dev/da0s1a 9.7G 70M 8.8G 1% / devfs 1.0K 1.0K 0B 100% /dev /dev/da0s1f 10G 1.2G 8.1G 13% /squidlogs /dev/da0s1d 19G 10G 7.8G 56% /usr /dev/da0s1e 19G 103M 18G 1% /var /dev/da0s1g 5.8G 92K 5.4G 0% /tmp /dev/da1s1d 7.8G 6.0G 1.2G 84% /bcache1 /dev/da1s1e 7.8G 6.0G 1.1G 84% /bcache2 /dev/da1s2d 7.8G 6.0G 1.1G 84% /bcache3 /dev/da1s2e 7.8G 6.0G 1.1G 84% /bcache4 /dev/da1s3d 7.8G 6.0G 1.1G 84% /bcache5 /dev/da1s3e 7.8G 6.0G 1.2G 84% /bcache6 /dev/da1s4d 7.8G 6.0G 1.1G 84% /bcache7 /dev/da1s4e 7.8G 6.0G 1.1G 84% /bcache8 /dev/da2s1d 7.8G 6.0G 1.2G 84% /ccache1 /dev/da2s1e 7.8G 6.0G 1.1G 84% /ccache2 /dev/da2s2d 7.8G 6.0G 1.1G 84% /ccache3 /dev/da2s2e 7.8G 6.0G 1.1G 84% /ccache4 /dev/da2s3d 7.8G 6.0G 1.2G 84% /ccache5 /dev/da2s3e 7.8G 6.0G 1.1G 84% /ccache6 /dev/da2s4d 7.8G 6.0G 1.2G 84% /ccache7 /dev/da2s4e 7.8G 6.0G 1.2G 84% /ccache8 /dev/da3s1d 7.8G 6.0G 1.1G 84% /dcache1 /dev/da3s1e 7.8G 6.0G 1.1G 84% /dcache2 /dev/da3s2d 7.8G 6.0G 1.1G 84% /dcache3 /dev/da3s2e 7.8G 6.0G 1.2G 84% /dcache4 /dev/da3s3d 7.8G 6.0G 1.1G 84% /dcache5 /dev/da3s3e 7.8G 6.0G 1.2G 84% /dcache6 /dev/da3s4d 7.8G 6.0G 1.1G 84% /dcache7 /dev/da3s4e 7.8G 6.0G 1.2G 84% /dcache8 My kernel was compiled in the day before yesterday with some tunning options: Commented: options PAE options MAXFILES=16384 In /boot/loader.conf file : kern.ipc.msgmnb=16384 # Origin: 2048 kern.ipc.msgmni=96 # Origin: 40 kern.ipc.msgseg=2048 # Origin: 2048 kern.ipc.msgssz=64 # Origin: 8 kern.ipc.msgtql=5120 # Origin: 40 kern.geom.debugflags=16 machdep.hyperthreading_allowed=1 kern.maxdsiz="2147483648" # 2GB kern.dfldsiz="2147483648" # 2GB kern.maxssiz="268435456" # 256MB kern.ipc.maxsockets="4008" kern.ipc.nmbclusters="32768" kern.ipc.nmbufs="65535" kern.ipc.nsfbufs="2496" net.inet.tcp.tcbhashsize="2048" In /etc/sysctl.conf file : net.inet.ip.portrange.first=20000 # Origin: 49152 net.inet.tcp.blackhole=2 net.inet.udp.blackhole=1 net.inet.tcp.recvspace=65535 net.inet.tcp.sendspace=65535 kern.ipc.somaxconn=32768 kern.ipc.maxsockbuf=2097152 net.inet.ip.redirect=0 net.inet.icmp.icmplim=100 net.inet.udp.maxdgram=65535 net.local.stream.sendspace=65535 net.local.stream.recvspace=65535 kern.maxfiles=65536 kern.maxfilesperproc=65536 net.inet.tcp.msl=7500 kern.securelevel=0 In squid.conf file : # SCSI Channel B HD * 8 cache_dir diskd /bcache1 7500 32 64 Q1=72 Q2=64 cache_dir diskd /bcache2 7500 32 64 Q1=72 Q2=64 cache_dir diskd /bcache3 7500 32 64 Q1=72 Q2=64 cache_dir diskd /bcache4 7500 32 64 Q1=72 Q2=64 cache_dir diskd /bcache5 7500 32 64 Q1=72 Q2=64 cache_dir diskd /bcache6 7500 32 64 Q1=72 Q2=64 cache_dir diskd /bcache7 7500 32 64 Q1=72 Q2=64 cache_dir diskd /bcache8 7500 32 64 Q1=72 Q2=64 # SCSI Channel C HD * 8 cache_dir diskd /ccache1 7500 32 64 Q1=72 Q2=64 cache_dir diskd /ccache2 7500 32 64 Q1=72 Q2=64 cache_dir diskd /ccache3 7500 32 64 Q1=72 Q2=64 cache_dir diskd /ccache4 7500 32 64 Q1=72 Q2=64 cache_dir diskd /ccache5 7500 32 64 Q1=72 Q2=64 cache_dir diskd /ccache6 7500 32 64 Q1=72 Q2=64 cache_dir diskd /ccache7 7500 32 64 Q1=72 Q2=64 cache_dir diskd /ccache8 7500 32 64 Q1=72 Q2=64 # SCSI Channel D HD * 8 cache_dir diskd /dcache1 7500 32 64 Q1=72 Q2=64 cache_dir diskd /dcache2 7500 32 64 Q1=72 Q2=64 cache_dir diskd /dcache3 7500 32 64 Q1=72 Q2=64 cache_dir diskd /dcache4 7500 32 64 Q1=72 Q2=64 cache_dir diskd /dcache5 7500 32 64 Q1=72 Q2=64 cache_dir diskd /dcache6 7500 32 64 Q1=72 Q2=64 cache_dir diskd /dcache7 7500 32 64 Q1=72 Q2=64 cache_dir diskd /dcache8 7500 32 64 Q1=72 Q2=64 cache_mem 1536 MB cache_swap_low 80 cache_swap_high 90 maximum_object_size 16 MB minimum_object_size 0 KB maximum_object_size_in_memory 500 KB ipcache_size 32768 ipcache_low 85 ipcache_high 95 fqdncache_size 32768 cache_replacement_policy lru memory_replacement_policy lru dns_children 32 request_body_max_size 100 MB half_closed_clients off store_avg_object_size 32 KB # top -d 1 last pid: 60798; load averages: 1.02, 0.99, 0.86 up 2+06:36:15 11:09:01 100 processes: 2 running, 98 sleeping CPU states: % user, % nice, % system, % interrupt, % idle Mem: 1876M Active, 1750M Inact, 204M Wired, 165M Cache, 112M Buf, 5660K Free Swap: 8065M Total, 104K Used, 8065M Free PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 60456 squid 1 105 0 1839M 1834M CPU2 2 31:06 83.89% squid 60490 squid 1 -4 0 1888K 988K msgwai 2 0:03 0.00% diskd-daemon 60498 squid 1 -4 0 1888K 1084K msgwai 2 0:03 0.00% diskd-daemon 60502 squid 1 -4 0 1888K 980K msgwai 0 0:03 0.00% diskd-daemon 60509 squid 1 -4 0 1888K 964K msgwai 0 0:02 0.00% diskd-daemon 60506 squid 1 -4 0 1888K 1004K msgwai 1 0:02 0.00% diskd-daemon ........ #squid -v Squid Cache: Version 2.6.STABLE18 configure options: '--prefix=/squid' '--enable-gnuregex' '--with-aufs-threads=320' '--with-pthreads' '--with-aio' '--with-dl' '--enable-async-io' '--enable-storeio=ufs,diskd,aufs,null' '--enable-removal-policies=heap lru' '--disable-wccp' '--enable-kill-parent-hack' '--enable-cachemgr-hostname=proxy4.tw' '--enable-cache-digests' '--enable-default-err-language=Traditional_Chinese' '--enable-err-languages=Traditional_Chinese' '--enable-poll' '--disable-ident-lookups' '--disable-internal-dns' '--disable-hostname-checks' '--enable-underscores' '--enable-stacktraces' '--enable-snmp' 'CFLAGS=-O2 -mcpu=pentium4 -march=pentium4 -mmmx -msse3 -m3dnow' #squidclient mgr:info HTTP/1.0 200 OK Server: squid/2.6.STABLE18 Date: Wed, 05 Mar 2008 03:11:22 GMT Content-Type: text/plain Expires: Wed, 05 Mar 2008 03:11:22 GMT Last-Modified: Wed, 05 Mar 2008 03:11:22 GMT X-Cache: MISS from proxy4.tw X-Cache-Lookup: MISS from proxy4.tw:8080 Via: 1.0 proxy4.tw:8080 (squid/2.6.STABLE18) Proxy-Connection: close Squid Object Cache: Version 2.6.STABLE18 Start Time: Wed, 05 Mar 2008 02:12:49 GMT Current Time: Wed, 05 Mar 2008 03:11:22 GMT Connection information for squid: Number of clients accessing cache: 845 Number of HTTP requests received: 437974 Number of ICP messages received: 0 Number of ICP messages sent: 0 Number of queued ICP replies: 0 Request failure ratio: 0.00 Average HTTP requests per minute since start: 7480.9 Average ICP messages per minute since start: 0.0 Select loop called: 3341104 times, 1.051 ms avg Cache information for squid: Request Hit Ratios: 5min: 27.0%, 60min: 19.7% Byte Hit Ratios: 5min: 13.2%, 60min: 7.2% Request Memory Hit Ratios: 5min: 19.0%, 60min: 23.1% Request Disk Hit Ratios: 5min: 23.3%, 60min: 17.7% Storage Swap size: 147455723 KB Storage Mem size: 687156 KB Mean Object Size: 30.55 KB Requests given to unlinkd: 0 Median Service Times (seconds) 5 min 60 min: HTTP Requests (All): 0.01387 0.09736 Cache Misses: 0.06286 0.16775 Cache Hits: 0.00091 0.00379 Near Hits: 0.03066 0.04519 Not-Modified Replies: 0.00000 0.00091 DNS Lookups: 0.00190 0.00372 ICP Queries: 0.00000 0.00000 Resource usage for squid: UP Time: 3512.725 seconds CPU Time: 1993.014 seconds CPU Usage: 56.74% CPU Usage, 5 minute avg: 88.82% CPU Usage, 60 minute avg: 56.51% Process Data Segment Size via sbrk(): 1927696 KB Maximum Resident Size: 1935028 KB Page faults with physical i/o: 4 Memory accounted for: Total accounted: 1087998 KB memPoolAlloc calls: 80133034 memPoolFree calls: 64600088 File descriptor usage for squid: Maximum number of file descriptors: 32768 Largest file desc currently in use: 1228 Number of file desc currently in use: 1118 Files queued for open: 0 Available number of file descriptors: 31650 Reserved number of file descriptors: 100 Store Disk files open: 0 IO loop method: poll Internal Data Structures: 4828174 StoreEntries 40667 StoreEntries with MemObjects 40574 Hot Object Cache Items 4826951 on-disk objects #squidclient gr:5min | grep client client_http.requests = 202.585409/sec client_http.hits = 50.436354/sec client_http.errors = 0.006667/sec client_http.kbytes_in = 181.338874/sec client_http.kbytes_out = 2728.809730/sec client_http.all_median_svc_time = 0.012346 seconds client_http.miss_median_svc_time = 0.032412 seconds client_http.nm_median_svc_time = 0.000000 seconds client_http.nh_median_svc_time = 0.028993 seconds client_http.hit_median_svc_time = 0.001017 seconds cache.log frequently show messages: EX: 2008/03/05 06:18:10| Starting Squid Cache version 2.6.STABLE18 for i386-unknown-freebsd6.3... 2008/03/05 06:18:10| Process ID 59372 2008/03/05 06:18:10| With 32768 file descriptors available 2008/03/05 06:18:10| Using poll for the IO loop 2008/03/05 06:18:10| Performing DNS Tests... 2008/03/05 06:18:10| Successful DNS name lookup tests... 2008/03/05 06:18:10| helperOpenServers: Starting 32 'dnsserver' processes 2008/03/05 06:18:10| Unlinkd pipe opened on FD 41 2008/03/05 06:18:10| Swap maxSize 184320000 KB, estimated 5760000 objects 2008/03/05 06:18:10| Target number of buckets: 288000 2008/03/05 06:18:10| Using 524288 Store buckets 2008/03/05 06:18:10| Max Mem size: 1572864 KB 2008/03/05 06:18:10| Max Swap size: 184320000 KB 2008/03/05 06:18:10| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec 2008/03/05 06:18:10| Store logging disabled 2008/03/05 06:18:10| Rebuilding storage in /bcache1 (CLEAN) 2008/03/05 06:18:10| Rebuilding storage in /bcache2 (CLEAN) 2008/03/05 06:18:10| Rebuilding storage in /bcache3 (CLEAN) 2008/03/05 06:18:10| Rebuilding storage in /bcache4 (CLEAN) 2008/03/05 06:18:10| Rebuilding storage in /bcache5 (CLEAN) ...... 2008/03/05 06:18:46| Store rebuilding is 2.0% complete 2008/03/05 06:19:19| Store rebuilding is 2.1% complete 2008/03/05 06:19:49| Store rebuilding is 4.1% complete 2008/03/05 06:20:20| Store rebuilding is 6.2% complete 2008/03/05 06:20:49| Store rebuilding is 8.2% complete 2008/03/05 06:38:01| Store rebuilding is 98.1% complete 2008/03/05 06:38:02| Done reading /dcache7 swaplog (205231 entries) 2008/03/05 06:38:03| Done reading /ccache1 swaplog (206124 entries) 2008/03/05 06:38:03| Done reading /dcache4 swaplog (206889 entries) 2008/03/05 06:38:04| Done reading /dcache2 swaplog (207196 entries) 2008/03/05 06:38:05| Done reading /bcache3 swaplog (209643 entries) 2008/03/05 06:38:06| Done reading /dcache3 swaplog (211186 entries) 2008/03/05 06:38:06| Done reading /dcache1 swaplog (213883 entries) 2008/03/05 06:38:06| Finished rebuilding storage from disk. 2008/03/05 06:38:06| 4838833 Entries scanned 2008/03/05 06:38:06| 0 Invalid entries. 2008/03/05 06:38:06| 0 With invalid flags. 2008/03/05 06:38:06| 4838713 Objects loaded. 2008/03/05 06:38:06| 0 Objects expired. 2008/03/05 06:38:06| 0 Objects cancelled. 2008/03/05 06:38:06| 120 Duplicate URLs purged. 2008/03/05 06:38:06| 0 Swapfile clashes avoided. 2008/03/05 06:38:06| Took 1195.8 seconds (4046.3 objects/sec). 2008/03/05 06:38:06| Beginning Validation Procedure 2008/03/05 06:38:06| 262144 Entries Validated so far. 2008/03/05 06:38:06| 524288 Entries Validated so far. ...... 2008/03/05 06:38:08| Completed Validation Procedure 2008/03/05 06:38:08| Validated 4838713 Entries 2008/03/05 06:38:08| store_swap_size = 147455350k 2008/03/05 06:38:11| storeLateRelease: released 142 objects 2008/03/05 06:58:34| httpReadReply: Excess data from "GET http://sugg.search.yahoo.com/sg/ ?output=fxjsonp&nresults=10&command=www" ....... 2008/03/05 07:23:51| httpAccept: FD 112: accept failure: (53) Software caused connection abort 2008/03/05 07:27:02| httpReadReply: Excess data from "GET http://webcs.msg.yahoo.com/crossdomain.xml" ........ 2008/03/05 08:51:10| httpAccept: FD 112: accept failure: (53) Software caused connection abort 2008/03/05 08:51:10| httpAccept: FD 112: accept failure: (53) Software caused connection abort 2008/03/05 08:51:10| httpAccept: FD 112: accept failure: (53) Software caused connection abort 2008/03/05 08:51:10| httpAccept: FD 112: accept failure: (53) Software caused connection abort 2008/03/05 08:51:10| httpAccept: FD 112: accept failure: (53) Software caused connection abort ....... 2008/03/05 09:17:07| parseHttpRequest: Unsupported method '^E^ACONNECT' 2008/03/05 09:17:07| clientReadRequest: FD 860 (140.1.144.197:2664) Invalid Request 2008/03/05 09:19:56| urlParse: Illegal character in hostname 'mlbglobal,.112.2o7.net' 2008/03/05 09:21:00| WARNING: 10 swapin MD5 mismatches ...... 2008/03/05 09:35:30| WARNING: All dnsserver processes are busy. 2008/03/05 09:35:30| WARNING: up to 32 pending requests queued ...... 2008/03/05 10:05:07| parseHttpRequest: Unsupported method '^E^ACONNECT' 2008/03/05 10:05:07| clientReadRequest: FD 446 (140.1.144.197:3222) Invalid Request 2008/03/05 10:05:13| WARNING: All dnsserver processes are busy. 2008/03/05 10:05:13| WARNING: up to 50 pending requests queued 2008/03/05 10:05:13| dnsSubmit: queue overload, rejecting l.yimg.com 2008/03/05 10:05:13| dnsSubmit: queue overload, rejecting l.yimg.com 2008/03/05 10:05:13| dnsSubmit: queue overload, rejecting l.yimg.com 2008/03/05 10:05:13| dnsSubmit: queue overload, rejecting l.yimg.com 2008/03/05 10:05:13| dnsSubmit: queue overload, rejecting l.yimg.com 2008/03/05 10:12:45| httpReadReply: Excess data from "GET http://38.114.207. 9/4939beeaad8cea7f780288f9ecbb670d5 FATAL: xcalloc: Unable to allocate 1 blocks of 4108 bytes! Squid Cache (Version 2.6.STABLE18): Terminated abnormally. CPU Usage: 3700.403 seconds = 444.883 user + 3255.521 sys Maximum Resident Size: 2102284 KB Page faults with physical i/o: 0 2008/03/05 10:12:45| ctx: enter level 0: 'http://www.schprs.edu.tw/images/layout_index_13.gif' 2008/03/05 10:12:45| storeDirWriteCleanLogs: Starting... 2008/03/05 10:12:49| Starting Squid Cache version 2.6.STABLE18 for i386-unknown-freebsd6.3... 2008/03/05 10:12:49| Process ID 60456 2008/03/05 10:12:49| With 32768 file descriptors available 2008/03/05 10:12:49| Using poll for the IO loop 2008/03/05 10:12:49| Performing DNS Tests... 2008/03/05 10:12:49| Successful DNS name lookup tests... 2008/03/05 10:12:49| helperOpenServers: Starting 32 'dnsserver' processes 2008/03/05 10:12:49| Unlinkd pipe opened on FD 41 2008/03/05 10:12:49| Swap maxSize 184320000 KB, estimated 5760000 objects 2008/03/05 10:12:49| Target number of buckets: 288000 2008/03/05 10:12:49| Using 524288 Store buckets 2008/03/05 10:12:49| Max Mem size: 1572864 KB 2008/03/05 10:12:49| Max Swap size: 184320000 KB 2008/03/05 10:12:49| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec 2008/03/05 10:12:49| Store logging disabled 2008/03/05 10:12:49| Rebuilding storage in /bcache1 (DIRTY) 2008/03/05 10:12:49| Rebuilding storage in /bcache2 (DIRTY) 2008/03/05 10:12:49| Rebuilding storage in /bcache3 (DIRTY) ........ 2008/03/05 10:37:22| httpReadReply: Excess data from "GET http://pic.wretch. cc/icon/blog/melinda/20050607/comme 2008/03/05 10:37:22| 1048576 Entries Validated so far. 2008/03/05 10:37:23| 1310720 Entries Validated so far. 2008/03/05 10:37:23| 1572864 Entries Validated so far. 2008/03/05 10:37:23| 1835008 Entries Validated so far. 2008/03/05 10:37:23| 2097152 Entries Validated so far. 2008/03/05 10:37:24| 2359296 Entries Validated so far. 2008/03/05 10:37:24| 2621440 Entries Validated so far. 2008/03/05 10:37:24| 2883584 Entries Validated so far. 2008/03/05 10:37:25| 3145728 Entries Validated so far. 2008/03/05 10:37:25| 3407872 Entries Validated so far. 2008/03/05 10:37:25| 3670016 Entries Validated so far. 2008/03/05 10:37:26| 3932160 Entries Validated so far. 2008/03/05 10:37:26| 4194304 Entries Validated so far. 2008/03/05 10:37:26| 4456448 Entries Validated so far. 2008/03/05 10:37:26| 4718592 Entries Validated so far. 2008/03/05 10:37:26| httpAccept: FD 112: accept failure: (53) Software caused connection abort 2008/03/05 10:37:27| httpAccept: FD 112: accept failure: (53) Software caused connection abort 2008/03/05 10:37:27| Completed Validation Procedure 2008/03/05 10:37:27| Validated 4794164 Entries 2008/03/05 10:37:27| store_swap_size = 147191853k squid is always restart cache.log show messages FATAL: xmalloc: Unable to allocate 65535 bytes! or FATAL: xcalloc: Unable to allocate 1 blocks of 4108 bytes! Any suggestion?!?! tanx --