On (09/04/15 00:01), Linus Torvalds wrote: > On Thu, Sep 3, 2015 at 11:35 PM, Sergey Senozhatsky > 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 : tunables : slabdata 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