Hi Ahmad, On 07/31/2013 03:36 PM, Ahmad wrote:
hi , i have a question i have a server with 48 G of rams , in squid.conf file ive served mem for squid to be only 1 G but my question is why is my total memory is get full after sometime ?? result is below from my server : ==================================================== root@drvirus:~# free -m total used free shared buffers cached Mem: 48296 47853 442 0 1893 38302 -/+ buffers/cache: 7658 40638 Swap: 0 0 0 root@drvirus:~# cat /etc/squid3/squid.conf | grep cache_mem cache_mem 1000 MB ========================================================== as we see , the free memory is just 442 M and ive just configured memory 1 g for squid , and also i only use my system for squid , so i dont tink that other processess other than squid is eating my memory !!
Please pay your attention that most of memory consumed is cache, i.e. the one is not really used at the moment and could be freed at any moment without harm to the system. Please see http://www.linuxatemyram.com/ for easy explanation.
here is output of the command top : top /top - 14:35:06 up 2 days, 22:58, 2 users, load average: 3.04, 2.25, 1.90 Tasks: 190 total, 1 running, 188 sleeping, 0 stopped, 1 zombie Cpu(s): 5.2%us, 9.7%sy, 0.0%ni, 77.4%id, 4.3%wa, 0.0%hi, 3.4%si, 0.0%st Mem: 49455732k total, 49092852k used, 362880k free, 1898256k buffers Swap: 0k total, 0k used, 0k free, 39341964k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2936 proxy 20 0 4950m 4.8g 2244 D 81 10.1 3025:47 squid3 15837 proxy 20 0 305m 171m 2532 S 78 0.4 43:02.94 python 2417 mysql 20 0 449m 61m 2724 S 7 0.1 208:01.06 mysqld 27535 proxy 20 0 148m 14m 2336 S 6 0.0 30:21.52 python 27536 proxy 20 0 147m 14m 2336 S 3 0.0 22:03.57 python 27542 proxy 20 0 147m 13m 2336 S 2 0.0 9:32.79 python 27539 proxy 20 0 147m 14m 2336 S 1 0.0 15:19.15 python 27549 proxy 20 0 148m 14m 2336 S 1 0.0 6:03.95 python 15 root 20 0 0 0 0 S 1 0.0 35:56.55 ksoftirqd/2 23 root 20 0 0 0 0 S 1 0.0 35:43.95 ksoftirqd/4 31 root 20 0 0 0 0 S 1 0.0 35:04.29 ksoftirqd/6 39 root 20 0 0 0 0 S 1 0.0 32:19.42 ksoftirqd/8 55 root 20 0 0 0 0 S 1 0.0 32:55.90 ksoftirqd/12 63 root 20 0 0 0 0 S 1 0.0 32:21.44 ksoftirqd/14 16225 proxy 20 0 3952 272 208 S 1 0.0 1:02.64 tail 27598 proxy 20 0 147m 13m 2344 S 1 0.0 3:35.83 python 3 root 20 0 0 0 0 S 1 0.0 19:24.87 ksoftirqd/0 47 root 20 0 0 0 0 S 1 0.0 34:32.83 ksoftirqd/10 2862 root 20 0 0 0 0 S 1 0.0 2:39.92 flush-8:0 27601 proxy 20 0 147m 16m 2336 S 1 0.0 2:19.74 python 28405 www-data 20 0 1208m 3912 1072 S 1 0.0 0:01.67 apache2 10 root 20 0 0 0 0 S 0 0.0 10:42.76 ksoftirqd/1 19 root 20 0 0 0 0 S 0 0.0 10:58.87 ksoftirqd/3 27 root 20 0 0 0 0 S 0 0.0 11:02.36 ksoftirqd/5 35 root 20 0 0 0 0 S 0 0.0 11:21.07 ksoftirqd/7 51 root 20 0 0 0 0 S 0 0.0 10:35.43 ksoftirqd/11 59 root 20 0 0 0 0 S 0 0.0 5:56.19 ksoftirqd/13 67 root 20 0 0 0 0 S 0 0.0 5:03.22 ksoftirqd/15 542 root 20 0 0 0 0 S 0 0.0 13:25.53 kswapd0 543 root 20 0 0 0 0 S 0 0.0 8:02.43 kswapd1 2866 root 20 0 0 0 0 S 0 0.0 6:52.55 flush-8:48 2867 root 20 0 0 0 0 S 0 0.0 8:07.08 flush-8:80 8141 www-data 20 0 1145m 4092 1136 S 0 0.0 0:03.23 apache2 9990 root 20 0 0 0 0 S 0 0.0 2:38.96 kworker/0:2 20502 www-data 20 0 1145m 5172 1152 S 0 0.0 0:10.88 apache2 27604 proxy 20 0 147m 13m 2336 S 0 0.0 1:27.98 python 30424 www-data 20 0 1145m 5124 1344 S 0 0.0 0:10.37 apache2 1 root 20 0 8404 760 624 S 0 0.0 0:03.01 init 2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd 5 root 20 0 0 0 0 S 0 0.0 0:04.12 kworker/u:0 / wish to clarify regards
Please note, that 'cache_mem' configuration directive just limits amount of memory used by cache itself, i.e. stored in cache documents. But squid in whole consumes more RAM, of course.
-- View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/question-in-cache-mem-in-squid-3-tp4661365.html Sent from the Squid - Users mailing list archive at Nabble.com.
Best wishes, Pavel