← Back to team overview

enterprise-support team mailing list archive

[Bug 1521086] [NEW] Squid3 huge memory usage on 14.04

 

Public bug reported:

We had installed squid 3.3.8 (offical packages) on ubuntu 12.04, when we
upgrade the OS from ubuntu 12.04 to 14.04, we found the memory usage
abnormal, eat up almost all memory.

After we investigation:

We use 2 servers for comparision:

3.3.8 (offical packages) on ubuntu 12.04

3.3.8 (offical packages) on ubuntu 14.04

all squid on ubuntu 12.04 works normal, all squid on ubuntu 14.04 memory
usage always keep going up, never goes down. But when I check the system
info, can not find where the memory was used. If we restart the squid
service, the memory comes back.


Can you give me any hints ?

Below is the info on abnormal server:

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.3 LTS
Release:	14.04
Codename:	trusty

free -m
             total       used       free     shared    buffers     cached
Mem:          7480       6405       1074          0        222        668
-/+ buffers/cache:       5513       1966
Swap:            0          0          0

cat /proc/meminfo
MemTotal:        7659544 kB
MemFree:         1107944 kB
Buffers:          228352 kB
Cached:           685076 kB
SwapCached:            0 kB
Active:          1373880 kB
Inactive:         199260 kB
Active(anon):     663652 kB
Inactive(anon):      316 kB
Active(file):     710228 kB
Inactive(file):   198944 kB
Unevictable:        5300 kB
Mlocked:            5300 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:               128 kB
Writeback:             0 kB
AnonPages:        665056 kB
Mapped:            21012 kB
Shmem:               712 kB
Slab:             332904 kB
SReclaimable:      77376 kB
SUnreclaim:       255528 kB
KernelStack:        1368 kB
PageTables:         5068 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     3829772 kB
Committed_AS:     864212 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       22316 kB
VmallocChunk:   34359708548 kB
HardwareCorrupted:     0 kB
AnonHugePages:    587776 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       51200 kB
DirectMap2M:     7944192 kB

cat /proc/net/sockstat
sockets: used 7086
TCP: inuse 7173 orphan 354 tw 1995 alloc 7224 mem 455543
UDP: inuse 9 mem 4
UDPLITE: inuse 0
RAW: inuse 1
FRAG: inuse 0 memory 0


netstat -na | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
LAST_ACK 39
LISTEN 5
SYN_RECV 7
CLOSE_WAIT 51
ESTABLISHED 6004
FIN_WAIT1 314
FIN_WAIT2 54
SYN_SENT 3
TIME_WAIT 1687

slabtop -s c
 Active / Total Objects (% used)    : 602429 / 841775 (71.6%)
 Active / Total Slabs (% used)      : 28101 / 28101 (100.0%)
 Active / Total Caches (% used)     : 64 / 97 (66.0%)
 Active / Total Size (% used)       : 282169.82K / 328114.05K (86.0%)
 Minimum / Average / Maximum Object : 0.01K / 0.39K / 8.00K

  OBJS ACTIVE  USE OBJ SIZE  SLABS OBJ/SLAB CACHE SIZE NAME
 37136  37003  99%    4.00K   4642        8    148544K kmalloc-4096
335283 173366  51%    0.10K   8597       39     34388K buffer_head
104768  94358  90%    0.25K   3274       32     26192K kmalloc-256
  9776   7033  71%    2.00K    611       16     19552K kmalloc-2048
  9810   6588  67%    1.75K    545       18     17440K TCP
 13959  13959 100%    0.96K    423       33     13536K ext4_inode_cache
 55083  52199  94%    0.19K   2623       21     10492K dentry
 13856   8621  62%    0.50K    433       32      6928K kmalloc-512
 52064  49778  95%    0.12K   1627       32      6508K kmalloc-128
  9650   6515  67%    0.62K    386       25      6176K sock_inode_cache
 18798   8329  44%    0.30K    723       26      5784K nf_conntrack_ffffffff81cdab80
 27825  16442  59%    0.19K   1325       21      5300K kmalloc-192
  9240   5902  63%    0.55K    330       28      5280K radix_tree_node
  7952   7952 100%    0.57K    284       28      4544K inode_cache
  2880   1874  65%    1.00K     90       32      2880K kmalloc-1024
 16992  16992 100%    0.11K    472       36      1888K sysfs_dir_cache
  2875   2875 100%    0.63K    115       25      1840K proc_inode_cache


We guess maybe it is malloc issue with ubuntu 14.04, but after we change
mallock to jemalloc, issue is still here, is there some bugs with squid
or dependencise libs ?

** Affects: squid3 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to squid3 in Ubuntu.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/1521086

Title:
  Squid3 huge memory usage on 14.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/squid3/+bug/1521086/+subscriptions