[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Permanenter Anstieg der Speicherauslastung



Am Mi., 3. Juli 2019 um 13:41 Uhr schrieb Matthias Böttcher
<matthias.boettcher@gmail.com>:

> Aber in /proc/meminfo fällt mir Slab auf:
>
> # cat /proc/meminfo | sort -k2 -rn | head
>
: VmallocTotal:   34359738367 kB
> CommitLimit:     6214868 kB
> SwapTotal:       4194300 kB
> SwapFree:        4139536 kB
> MemTotal:        4041140 kB
> DirectMap2M:     3999744 kB
> Slab:            3785412 kB
> SUnreclaim:      3483524 kB
> SReclaimable:     301888 kB
> Committed_AS:     255324 kB
>
> Ich werde mich jetzt mit slabtop und /proc/slabinfo beschäftigen.

Mit slabtop habe ich im Abstand von 4 Stunden folgende Werte ermittelt.
# sortiert nach cache size, top 5
slabtop --sort c --once | head -n12

Active / Total Objects (% used)    : 5344096 / 5416698 (98,7%)
Active / Total Slabs (% used)      : 169970 / 169970 (100,0%)
Active / Total Caches (% used)     : 98 / 124 (79,0%)
Active / Total Size (% used)       : 1250974,01K / 1269208,02K (98,6%)
Minimum / Average / Maximum Object : 0,01K / 0,23K / 8,00K
 OBJS ACTIVE  USE OBJ SIZE  SLABS OBJ/SLAB CACHE SIZE NAME
686489 680331  99%    0,20K  36131       19    144524K vm_area_struct
32680  32667  99%    3,69K   4085        8    130720K task_struct
119610 119302  99%    1,05K   7974       15    127584K ext4_inode_cache
414000 351269  84%    0,25K  25875       16    103500K filp
19304  19304 100%    4,00K   2413        8     77216K kmalloc-4096

und 4 h später:

Active / Total Objects (% used)    : 6338008 / 6426214 (98,6%)
Active / Total Slabs (% used)      : 201617 / 201617 (100,0%)
Active / Total Caches (% used)     : 98 / 124 (79,0%)
Active / Total Size (% used)       : 1477988,80K / 1500107,79K (98,5%)
Minimum / Average / Maximum Object : 0,01K / 0,23K / 8,00K
 OBJS ACTIVE  USE OBJ SIZE  SLABS OBJ/SLAB CACHE SIZE NAME
831934 824583  99%    0,20K  43786       19    175144K vm_area_struct
39696  39683  99%    3,69K   4962        8    158784K task_struct
119625 119274  99%    1,05K   7975       15    127600K ext4_inode_cache
503024 426434  84%    0,25K  31439       16    125756K filp
23432  23432 100%    4,00K   2929        8     93728K kmalloc-4096

Anstieg innerhalb von 4 Stunden:

vm_area_struct 144524K -> 175144K
task_struct 130720K -> 158784K
filp 103500K -> 125756K
kmalloc-4096 77216K  -> 93728K

Ist das ein Memory Leak im Kernel?
4.19.0-5-amd64 #1 SMP Debian 4.19.37-5 (2019-06-19) x86_64 GNU/Linux

Matthias


Reply to: