[dm-devel] slab-nomerge (was Re: [git pull] device mapper changes for 4.3)
Sergey Senozhatsky
sergey.senozhatsky.work at gmail.com
Fri Sep 4 07:59:45 UTC 2015
On (09/04/15 00:01), Linus Torvalds wrote:
> On Thu, Sep 3, 2015 at 11:35 PM, Sergey Senozhatsky
> <sergey.senozhatsky.work at gmail.com> wrote:
> >
> > Out of curiosity, I did some quite simple-minded
> > "slab_nomerge = 0" vs. "slab_nomerge = 1" tests today on my old
> > x86_64 box (4gigs of RAM, ext4, 4.2.0-next-20150903):
>
> So out of interest, was this slab or slub? Also, how repeatable is
> this? The memory usage between two boots tends to be rather fragile -
> some of the bigger slab users are dentries and inodes, and various
> filesystem scanning events will end up skewing things a _lot_.
>
> But if it turns out that the numbers are pretty stable, and sharing
> really doesn't save memory, then that is certainly a big failure. I
> think Christoph did much of his work for bigger machines where one of
> the SLAB issues was the NUMA overhead, and who knows - maybe it worked
> well for the load and machine in question, but not necessarily
> elsewhere.
>
> Interesting.
>
grep SLAB .config
# CONFIG_SLAB is not set
CONFIG_SLABINFO=y
grep SLUB .config
CONFIG_SLUB_DEBUG=y
CONFIG_SLUB=y
CONFIG_SLUB_CPU_PARTIAL=y
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_SLUB_STATS is not set
The numbers are stable on my box. Did another round of tests.
Please find attached (hope attachments are OK):
-- git clone glibc; make -j8; package; clean up
It differs on both busy and idle systems.
I was a bit surprised to see 0 unused memory
..
33472
56128
56128
0
0
0
0
0
0
0
0
0
0
0
59392
59392
59392
..
But I went through the corresponding slabinfo (I track slabinfo too); and yes,
zero unused objects.
slabinfo - version: 2.1
# name <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata <active_slabs> <num_slabs> <sharedavail>
ext4_groupinfo_1k 36 36 224 18 1 : tunables 0 0 0 : slabdata 2 2 0
ext4_groupinfo_4k 7412 7412 232 17 1 : tunables 0 0 0 : slabdata 436 436 0
sda2 117 117 104 39 1 : tunables 0 0 0 : slabdata 3 3 0
sd_ext_cdb 128 128 32 128 1 : tunables 0 0 0 : slabdata 1 1 0
scsi_sense_cache 224 224 128 32 1 : tunables 0 0 0 : slabdata 7 7 0
scsi_cmd_cache 166 234 448 18 2 : tunables 0 0 0 : slabdata 13 13 0
sgpool-128 16 16 4096 8 8 : tunables 0 0 0 : slabdata 2 2 0
sgpool-64 48 48 2048 16 8 : tunables 0 0 0 : slabdata 3 3 0
sgpool-32 64 64 1024 16 4 : tunables 0 0 0 : slabdata 4 4 0
sgpool-16 64 64 512 16 2 : tunables 0 0 0 : slabdata 4 4 0
sgpool-8 176 176 256 16 1 : tunables 0 0 0 : slabdata 11 11 0
scsi_data_buffer 0 0 24 170 1 : tunables 0 0 0 : slabdata 0 0 0
ip6-frags 0 0 280 29 2 : tunables 0 0 0 : slabdata 0 0 0
fib6_nodes 128 128 64 64 1 : tunables 0 0 0 : slabdata 2 2 0
ip6_dst_cache 42 42 384 21 2 : tunables 0 0 0 : slabdata 2 2 0
PINGv6 0 0 1472 22 8 : tunables 0 0 0 : slabdata 0 0 0
RAWv6 22 22 1472 22 8 : tunables 0 0 0 : slabdata 1 1 0
UDPLITEv6 0 0 1472 22 8 : tunables 0 0 0 : slabdata 0 0 0
UDPv6 44 44 1472 22 8 : tunables 0 0 0 : slabdata 2 2 0
tw_sock_TCPv6 0 0 272 30 2 : tunables 0 0 0 : slabdata 0 0 0
request_sock_TCPv6 0 0 312 26 2 : tunables 0 0 0 : slabdata 0 0 0
TCPv6 0 0 2752 11 8 : tunables 0 0 0 : slabdata 0 0 0
bsg_cmd 0 0 312 26 2 : tunables 0 0 0 : slabdata 0 0 0
mqueue_inode_cache 25 25 1280 25 8 : tunables 0 0 0 : slabdata 1 1 0
hugetlbfs_inode_cache 18 18 872 18 4 : tunables 0 0 0 : slabdata 1 1 0
jbd2_transaction_s 100 100 320 25 2 : tunables 0 0 0 : slabdata 4 4 0
jbd2_inode 340 340 48 85 1 : tunables 0 0 0 : slabdata 4 4 0
jbd2_journal_handle 204 204 80 51 1 : tunables 0 0 0 : slabdata 4 4 0
jbd2_journal_head 136 136 120 34 1 : tunables 0 0 0 : slabdata 4 4 0
jbd2_revoke_table_s 1024 1024 16 256 1 : tunables 0 0 0 : slabdata 4 4 0
jbd2_revoke_record_s 128 128 32 128 1 : tunables 0 0 0 : slabdata 1 1 0
ext4_inode_cache 2178 2178 1744 18 8 : tunables 0 0 0 : slabdata 121 121 0
ext4_free_data 192 192 64 64 1 : tunables 0 0 0 : slabdata 3 3 0
ext4_allocation_context 64 64 128 32 1 : tunables 0 0 0 : slabdata 2 2 0
ext4_prealloc_space 52 52 152 26 1 : tunables 0 0 0 : slabdata 2 2 0
ext4_system_zone 816 816 40 102 1 : tunables 0 0 0 : slabdata 8 8 0
ext4_io_end 224 224 72 56 1 : tunables 0 0 0 : slabdata 4 4 0
ext4_extent_status 3876 3876 40 102 1 : tunables 0 0 0 : slabdata 38 38 0
kioctx 0 0 896 18 4 : tunables 0 0 0 : slabdata 0 0 0
aio_kiocb 0 0 128 32 1 : tunables 0 0 0 : slabdata 0 0 0
dio 0 0 704 23 4 : tunables 0 0 0 : slabdata 0 0 0
fasync_cache 42 42 96 42 1 : tunables 0 0 0 : slabdata 1 1 0
pid_namespace 0 0 2256 14 8 : tunables 0 0 0 : slabdata 0 0 0
posix_timers_cache 0 0 264 31 2 : tunables 0 0 0 : slabdata 0 0 0
UNIX 110 110 1472 22 8 : tunables 0 0 0 : slabdata 5 5 0
ip4-frags 0 0 264 31 2 : tunables 0 0 0 : slabdata 0 0 0
ip_mrt_cache 0 0 192 21 1 : tunables 0 0 0 : slabdata 0 0 0
UDP-Lite 0 0 1344 24 8 : tunables 0 0 0 : slabdata 0 0 0
tcp_bind_bucket 64 64 64 64 1 : tunables 0 0 0 : slabdata 1 1 0
inet_peer_cache 0 0 192 21 1 : tunables 0 0 0 : slabdata 0 0 0
ip_fib_trie 340 340 48 85 1 : tunables 0 0 0 : slabdata 4 4 0
ip_fib_alias 292 292 56 73 1 : tunables 0 0 0 : slabdata 4 4 0
ip_dst_cache 64 64 256 16 1 : tunables 0 0 0 : slabdata 4 4 0
PING 0 0 1280 25 8 : tunables 0 0 0 : slabdata 0 0 0
RAW 25 25 1280 25 8 : tunables 0 0 0 : slabdata 1 1 0
UDP 96 96 1344 24 8 : tunables 0 0 0 : slabdata 4 4 0
tw_sock_TCP 0 0 272 30 2 : tunables 0 0 0 : slabdata 0 0 0
request_sock_TCP 0 0 312 26 2 : tunables 0 0 0 : slabdata 0 0 0
TCP 12 12 2560 12 8 : tunables 0 0 0 : slabdata 1 1 0
eventpoll_pwq 224 224 72 56 1 : tunables 0 0 0 : slabdata 4 4 0
eventpoll_epi 192 192 128 32 1 : tunables 0 0 0 : slabdata 6 6 0
inotify_inode_mark 120 120 136 30 1 : tunables 0 0 0 : slabdata 4 4 0
blkdev_queue 22 22 2816 11 8 : tunables 0 0 0 : slabdata 2 2 0
blkdev_requests 322 322 344 23 2 : tunables 0 0 0 : slabdata 14 14 0
blkdev_ioc 88 88 184 22 1 : tunables 0 0 0 : slabdata 4 4 0
bio-0 315 315 192 21 1 : tunables 0 0 0 : slabdata 15 15 0
biovec-256 56 96 4096 8 8 : tunables 0 0 0 : slabdata 12 12 0
biovec-128 16 16 2048 16 8 : tunables 0 0 0 : slabdata 1 1 0
biovec-64 64 64 1024 16 4 : tunables 0 0 0 : slabdata 4 4 0
biovec-16 64 64 256 16 1 : tunables 0 0 0 : slabdata 4 4 0
uid_cache 64 64 128 32 1 : tunables 0 0 0 : slabdata 2 2 0
sock_inode_cache 153 153 960 17 4 : tunables 0 0 0 : slabdata 9 9 0
skbuff_fclone_cache 90 90 448 18 2 : tunables 0 0 0 : slabdata 5 5 0
skbuff_head_cache 320 320 256 16 1 : tunables 0 0 0 : slabdata 20 20 0
configfs_dir_cache 0 0 96 42 1 : tunables 0 0 0 : slabdata 0 0 0
file_lock_cache 64 64 256 16 1 : tunables 0 0 0 : slabdata 4 4 0
file_lock_ctx 156 156 104 39 1 : tunables 0 0 0 : slabdata 4 4 0
net_namespace 0 0 4480 7 8 : tunables 0 0 0 : slabdata 0 0 0
shmem_inode_cache 1023 1023 1048 31 8 : tunables 0 0 0 : slabdata 33 33 0
pool_workqueue 64 64 256 16 1 : tunables 0 0 0 : slabdata 4 4 0
proc_inode_cache 1309 1309 928 17 4 : tunables 0 0 0 : slabdata 77 77 0
sigqueue 100 100 160 25 1 : tunables 0 0 0 : slabdata 4 4 0
bdev_cache 96 96 1344 24 8 : tunables 0 0 0 : slabdata 4 4 0
kernfs_node_cache 17836 17836 152 26 1 : tunables 0 0 0 : slabdata 686 686 0
mnt_cache 108 108 448 18 2 : tunables 0 0 0 : slabdata 6 6 0
filp 1757 1998 448 18 2 : tunables 0 0 0 : slabdata 111 111 0
inode_cache 9234 9234 872 18 4 : tunables 0 0 0 : slabdata 513 513 0
dentry 15036 15036 288 28 2 : tunables 0 0 0 : slabdata 537 537 0
names_cache 32 32 4096 8 8 : tunables 0 0 0 : slabdata 4 4 0
buffer_head 11427 11427 104 39 1 : tunables 0 0 0 : slabdata 293 293 0
nsproxy 170 170 48 85 1 : tunables 0 0 0 : slabdata 2 2 0
vm_area_struct 4462 4462 176 23 1 : tunables 0 0 0 : slabdata 194 194 0
mm_struct 112 112 1152 28 8 : tunables 0 0 0 : slabdata 4 4 0
fs_cache 105 105 192 21 1 : tunables 0 0 0 : slabdata 5 5 0
files_cache 95 95 832 19 4 : tunables 0 0 0 : slabdata 5 5 0
signal_cache 225 225 1280 25 8 : tunables 0 0 0 : slabdata 9 9 0
sighand_cache 182 182 2240 14 8 : tunables 0 0 0 : slabdata 13 13 0
task_struct 187 192 4928 6 8 : tunables 0 0 0 : slabdata 32 32 0
cred_jar 2179 2368 128 32 1 : tunables 0 0 0 : slabdata 74 74 0
Acpi-Operand 1680 1680 72 56 1 : tunables 0 0 0 : slabdata 30 30 0
Acpi-ParseExt 204 204 80 51 1 : tunables 0 0 0 : slabdata 4 4 0
Acpi-Parse 292 292 56 73 1 : tunables 0 0 0 : slabdata 4 4 0
Acpi-State 204 204 80 51 1 : tunables 0 0 0 : slabdata 4 4 0
Acpi-Namespace 1122 1122 40 102 1 : tunables 0 0 0 : slabdata 11 11 0
anon_vma_chain 4096 4096 64 64 1 : tunables 0 0 0 : slabdata 64 64 0
anon_vma 2472 2472 168 24 1 : tunables 0 0 0 : slabdata 103 103 0
pid 256 256 128 32 1 : tunables 0 0 0 : slabdata 8 8 0
radix_tree_node 2016 2016 584 28 4 : tunables 0 0 0 : slabdata 72 72 0
trace_event_file 1058 1058 88 46 1 : tunables 0 0 0 : slabdata 23 23 0
ftrace_event_field 2550 2550 48 85 1 : tunables 0 0 0 : slabdata 30 30 0
idr_layer_cache 300 300 2096 15 8 : tunables 0 0 0 : slabdata 20 20 0
page->ptl 2117 2117 56 73 1 : tunables 0 0 0 : slabdata 29 29 0
dma-kmalloc-8192 0 0 8192 4 8 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-4096 0 0 4096 8 8 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-2048 0 0 2048 16 8 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-1024 0 0 1024 16 4 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-512 0 0 512 16 2 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-256 0 0 256 16 1 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-128 0 0 128 32 1 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-64 0 0 64 64 1 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-32 0 0 32 128 1 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-16 0 0 16 256 1 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-8 0 0 8 512 1 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-192 0 0 192 21 1 : tunables 0 0 0 : slabdata 0 0 0
dma-kmalloc-96 0 0 96 42 1 : tunables 0 0 0 : slabdata 0 0 0
kmalloc-8192 44 44 8192 4 8 : tunables 0 0 0 : slabdata 11 11 0
kmalloc-4096 200 200 4096 8 8 : tunables 0 0 0 : slabdata 25 25 0
kmalloc-2048 816 816 2048 16 8 : tunables 0 0 0 : slabdata 51 51 0
kmalloc-1024 672 672 1024 16 4 : tunables 0 0 0 : slabdata 42 42 0
kmalloc-512 544 544 512 16 2 : tunables 0 0 0 : slabdata 34 34 0
kmalloc-256 1344 1344 256 16 1 : tunables 0 0 0 : slabdata 84 84 0
kmalloc-192 903 903 192 21 1 : tunables 0 0 0 : slabdata 43 43 0
kmalloc-128 3168 3168 128 32 1 : tunables 0 0 0 : slabdata 99 99 0
kmalloc-96 1092 1092 96 42 1 : tunables 0 0 0 : slabdata 26 26 0
kmalloc-64 7424 7424 64 64 1 : tunables 0 0 0 : slabdata 116 116 0
kmalloc-32 1792 1792 32 128 1 : tunables 0 0 0 : slabdata 14 14 0
kmalloc-16 3584 3584 16 256 1 : tunables 0 0 0 : slabdata 14 14 0
kmalloc-8 5120 5120 8 512 1 : tunables 0 0 0 : slabdata 10 10 0
kmem_cache_node 224 224 128 32 1 : tunables 0 0 0 : slabdata 7 7 0
kmem_cache 189 189 192 21 1 : tunables 0 0 0 : slabdata 9 9 0
-ss
-------------- next part --------------
46016
90688
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
36608
33472
33472
56128
56128
0
0
0
0
0
0
0
0
0
0
0
59392
59392
59392
43008
43008
43008
26624
26624
26624
26624
7168
7168
61440
61440
61440
57344
49152
29696
47104
47104
47104
19456
77824
77824
77824
77824
45056
45056
45056
45056
45056
45056
63488
63488
19456
19456
19456
19456
19456
19456
19456
47104
47104
19456
19456
19456
19456
19456
19456
19456
19456
19456
19456
3072
3072
3072
3072
3072
3072
3072
3072
3072
3072
3072
3072
3072
3072
3072
3072
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
63488
67584
63488
63488
121280
121280
125120
90112
114368
63488
105728
142720
159488
155584
158400
195200
117952
208768
70272
72704
89664
134336
80512
109120
109120
109120
54016
30720
30720
67072
134912
134912
132928
132928
132928
117120
117120
74240
48576
115648
53248
173056
122496
129152
69440
127808
107456
51392
100544
50944
110976
103040
46336
56704
153216
91520
161472
161472
139264
167872
81920
96704
96704
96704
96704
96704
96704
96704
96704
142976
142976
142976
81920
122176
122176
139712
172480
170176
168192
143872
143872
168256
143552
188864
188864
188864
99328
81920
151616
81920
94016
94016
94016
94016
94016
94016
94016
157248
81920
150144
198464
174784
136640
121216
92608
153856
174144
174144
174144
127296
127296
127296
121792
121792
121792
121792
113280
113280
113280
113280
113280
113280
113280
113280
113280
113280
113280
113280
109504
109504
109504
109504
74176
111936
66560
125440
124352
128064
74368
123136
68160
118912
118912
135616
59904
139904
136320
188544
188544
169088
169088
76352
104128
102208
133440
109824
114560
101184
120064
114432
119936
108352
104128
177088
97984
112128
120320
106944
187328
85952
74624
74496
122944
112704
122816
48512
40448
40448
102720
104448
149824
101504
91008
245632
192384
206144
206592
173696
195648
113152
156416
106368
262144
186304
155712
114880
183296
107328
102592
161728
153728
80064
124672
110528
116288
141888
95104
40448
153920
138240
40448
40448
40448
40448
40448
168064
175488
115712
112768
94272
52672
103680
87040
122944
100416
36352
79360
79360
79360
83328
112192
112192
112192
112192
89088
86144
96896
94656
36352
114624
115712
106496
96128
96128
96128
72064
72064
72064
40064
40064
36352
36352
36352
134912
125248
56384
37504
36352
36352
36352
36352
36352
36352
36352
36352
82240
71616
59776
36352
36352
36352
38656
36352
103232
88896
36352
59840
36352
133440
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
109888
91968
91968
91968
92096
92096
92096
92096
92096
92096
92096
92096
92096
92096
92096
92096
92096
92096
92096
92096
92096
92096
92096
92096
80640
36352
55936
78912
36352
74112
36352
135744
167808
193088
157120
157120
125376
174784
232128
232128
222144
206912
206912
206912
206912
198976
178816
154880
154880
167680
208128
151296
139520
113792
80640
76032
76032
76032
76032
76032
76032
76032
62592
62592
62592
62592
62592
62592
62592
62592
58624
48384
73856
73856
73856
73088
40832
40832
40832
40832
40832
40832
40832
40832
40832
40832
40832
40832
40832
36352
36352
36352
36352
36352
36352
36352
36352
64320
36352
36352
36352
36352
36352
36352
-------------- next part --------------
180032
119360
106176
200640
193472
156864
156864
156864
181440
181440
169152
169152
122048
179136
179392
203200
232832
232832
302848
303360
303872
304384
308608
326656
354240
327744
334272
347456
375808
326592
308672
304960
344768
324352
318464
340736
340736
351488
340736
340736
336768
356736
352640
336768
353856
352576
346560
343488
337600
340928
359616
340672
337600
340416
355008
360640
341504
365568
331456
353152
353600
330496
366464
358784
371072
318336
318336
304256
330880
327552
296832
295040
295040
297088
312192
298624
304256
296320
411392
431104
414720
416512
421888
429312
422656
411392
394240
415744
361728
366848
356864
372480
372480
390656
378624
382208
371968
381440
364544
364288
318336
318336
307328
307328
378688
358016
365824
372352
367488
346752
359168
339520
351168
334656
341568
330816
327488
335936
410368
388608
379648
373120
375680
426752
358464
409216
396864
417216
364480
433472
410240
472000
436800
373440
398080
398080
398080
398080
361984
361984
381184
381440
381440
381824
373632
457728
427968
436160
422016
463680
412096
416768
382976
347264
380416
332928
349568
285760
302912
248128
342720
338624
338624
335360
331456
331712
325184
302272
303104
303104
303104
329856
327424
483968
391232
368320
445312
395456
421376
344320
269824
256576
313600
304896
366464
355264
362112
456000
398208
526272
497280
518144
507200
511040
425536
349248
357824
389376
391616
372416
365760
422784
449664
538560
492992
537408
528192
524608
409280
468608
434304
398272
397568
468928
412160
381184
412224
372096
375296
390656
316352
307264
371648
486720
403776
400064
365120
389760
490944
355200
447168
428416
439680
501056
595200
591872
541312
549120
554048
646080
545344
572288
527872
561344
601472
595520
593728
665984
557248
683584
607808
553920
612032
603392
523264
589888
469504
690816
777728
677312
562240
407488
429440
500992
478592
405760
427456
534016
369472
369216
468352
396672
443392
418432
477504
445632
382720
282816
279424
303808
273408
250176
304256
277632
283136
297472
256320
244096
219328
267584
281216
259456
284160
341824
333248
315392
283008
263360
313280
401728
329344
291200
428032
284800
384960
371904
303232
342400
271168
292992
297408
363008
366336
401920
426176
362944
315840
337792
298752
306560
332352
323968
243520
329088
338432
310336
322112
319872
263552
395520
290240
278592
314304
254592
388416
342208
504640
501568
389248
430528
506112
465984
413952
474624
456896
377344
298048
308736
376768
381184
378432
406080
387840
401408
394560
299200
338880
293952
256576
282368
247872
276224
292032
360576
305920
364160
323584
416448
307904
289856
367040
322048
341120
397888
331072
306688
340928
319872
319872
328960
388352
382336
428224
380480
366720
313792
285120
321024
298304
285120
239168
388288
454464
430336
427904
520704
472576
525312
487296
591296
541760
523968
523072
548096
453056
509504
524800
499520
484992
440000
444160
440576
439360
420224
369344
372608
372608
372608
372608
372608
372608
372608
372608
372608
372608
356224
356224
356224
356224
356224
411584
399296
399488
399488
377472
541312
525760
525760
525760
525760
462784
462784
437248
431872
477120
563968
562048
559296
556224
547520
565888
582336
563968
552320
552320
543680
604928
601920
654720
633792
624704
575168
562112
545088
559872
594880
577024
585600
568128
559104
614400
576256
485504
529408
529408
524672
505664
497664
497664
495488
495488
483520
452032
454656
451136
451136
510592
514048
514048
514048
532032
487104
463040
426176
426176
426176
426176
403392
403392
401472
368832
368832
368832
404800
404800
404800
422336
422336
422336
422336
390400
361920
362048
359360
392704
390336
387968
388672
388672
426112
352704
356672
356800
356800
356800
357248
357248
357248
357248
357248
357248
357248
405952
405952
405952
405952
405952
444032
444032
442880
-------------- next part --------------
A non-text attachment was scrubbed...
Name: glibc-merge_vs_nomerge.png
Type: image/png
Size: 30161 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20150904/106a1d1f/attachment.png>
More information about the dm-devel
mailing list