Re: [VM] 2.4.14/15-pre4 too "swap-happy"?

From: janne (sniff@xxx.ath.cx)
Date: Thu Nov 15 2001 - 03:38:13 EST


i've noticed some weirdness too.
i'm using 2.4.15-pre1 on a 1.4ghz athlon kt266a system with 1GB ram.

i first noticed this as i was copying large amount of data (10+ gigs)
across two reiserfs partitions and during that copy uniconified one
mozilla window which took about 30 seconds before it finished redrawing
the window and became responsive again.

to me it seems that latest 2.4 kernels are too eager to swapout things
to make room for cache on machines with _lots_ of memory.

this time i tried the same thing on a freshly rebooted machine.
uniconified mozilla when i was 35megs on swap, this time it took
under 10 secs to become responsive, but on the other hand it had
just been running a few minutes so it's memory footprint was still
quite small.

imho we should not be swapping so eagerly when there is lots of memory
and already 800+ megs used for cache...

attached vmstat log from start of copying to uniconifying mozilla.

slabinfo and meminfo before copying:

slabinfo - version: 1.1
kmem_cache 58 68 112 2 2 1
tcp_tw_bucket 3 30 128 1 1 1
tcp_bind_bucket 16 112 32 1 1 1
tcp_open_request 0 59 64 0 1 1
inet_peer_cache 0 0 64 0 0 1
ip_fib_hash 9 112 32 1 1 1
ip_dst_cache 71 80 192 4 4 1
arp_cache 2 30 128 1 1 1
urb_priv 1 59 64 1 1 1
blkdev_requests 512 540 128 18 18 1
nfs_read_data 0 0 384 0 0 1
nfs_write_data 0 0 384 0 0 1
nfs_page 0 0 128 0 0 1
dnotify cache 0 0 20 0 0 1
file lock cache 2 42 92 1 1 1
fasync cache 1 202 16 1 1 1
uid_cache 2 112 32 1 1 1
skbuff_head_cache 129 140 192 7 7 1
sock 131 144 832 16 16 2
sigqueue 0 29 132 0 1 1
cdev_cache 286 295 64 5 5 1
bdev_cache 4 59 64 1 1 1
mnt_cache 12 59 64 1 1 1
inode_cache 2853 2870 512 409 410 1
dentry_cache 3957 3990 128 132 133 1
filp 1168 1170 128 39 39 1
names_cache 0 7 4096 0 7 1
buffer_head 19989 20010 128 667 667 1
mm_struct 51 60 192 3 3 1
vm_area_struct 2154 2340 128 73 78 1
fs_cache 50 59 64 1 1 1
files_cache 50 54 448 6 6 1
signal_act 54 57 1344 18 19 1
size-131072(DMA) 0 0 131072 0 0 32
size-131072 0 0 131072 0 0 32
size-65536(DMA) 0 0 65536 0 0 16
size-65536 0 0 65536 0 0 16
size-32768(DMA) 0 0 32768 0 0 8
size-32768 2 2 32768 2 2 8
size-16384(DMA) 0 0 16384 0 0 4
size-16384 2 6 16384 2 6 4
size-8192(DMA) 0 0 8192 0 0 2
size-8192 3 4 8192 3 4 2
size-4096(DMA) 0 0 4096 0 0 1
size-4096 55 60 4096 55 60 1
size-2048(DMA) 0 0 2048 0 0 1
size-2048 8 50 2048 4 25 1
size-1024(DMA) 0 0 1024 0 0 1
size-1024 36 44 1024 9 11 1
size-512(DMA) 0 0 512 0 0 1
size-512 37 48 512 5 6 1
size-256(DMA) 0 0 256 0 0 1
size-256 41 60 256 3 4 1
size-128(DMA) 3 30 128 1 1 1
size-128 568 720 128 19 24 1
size-64(DMA) 0 0 64 0 0 1
size-64 331 354 64 6 6 1
size-32(DMA) 52 59 64 1 1 1
size-32 1044 1062 64 18 18 1

        total: used: free: shared: buffers: cached:
Mem: 1054724096 191864832 862859264 0 5967872 77918208
Swap: 1077501952 0 1077501952
MemTotal: 1030004 kB
MemFree: 842636 kB
MemShared: 0 kB
Buffers: 5828 kB
Cached: 76092 kB
SwapCached: 0 kB
Active: 22164 kB
Inactive: 147532 kB
HighTotal: 131008 kB
HighFree: 2044 kB
LowTotal: 898996 kB
LowFree: 840592 kB
SwapTotal: 1052248 kB
SwapFree: 1052248 kB

slabinfo and meminfo after copying:

slabinfo - version: 1.1
kmem_cache 58 68 112 2 2 1
tcp_tw_bucket 3 30 128 1 1 1
tcp_bind_bucket 16 112 32 1 1 1
tcp_open_request 0 59 64 0 1 1
inet_peer_cache 0 0 64 0 0 1
ip_fib_hash 9 112 32 1 1 1
ip_dst_cache 8 60 192 3 3 1
arp_cache 2 30 128 1 1 1
urb_priv 1 59 64 1 1 1
blkdev_requests 512 540 128 18 18 1
nfs_read_data 0 0 384 0 0 1
nfs_write_data 0 0 384 0 0 1
nfs_page 0 0 128 0 0 1
dnotify cache 0 0 20 0 0 1
file lock cache 3 42 92 1 1 1
fasync cache 1 202 16 1 1 1
uid_cache 2 112 32 1 1 1
skbuff_head_cache 129 140 192 7 7 1
sock 133 144 832 16 16 2
sigqueue 0 29 132 0 1 1
cdev_cache 21 118 64 2 2 1
bdev_cache 5 59 64 1 1 1
mnt_cache 13 59 64 1 1 1
inode_cache 1501 2408 512 344 344 1
dentry_cache 767 3210 128 107 107 1
filp 1262 1290 128 43 43 1
names_cache 0 2 4096 0 2 1
buffer_head 226567 227160 128 7569 7572 1
mm_struct 54 60 192 3 3 1
vm_area_struct 2292 2430 128 77 81 1
fs_cache 53 59 64 1 1 1
files_cache 53 63 448 6 7 1
signal_act 57 63 1344 20 21 1
size-131072(DMA) 0 0 131072 0 0 32
size-131072 0 0 131072 0 0 32
size-65536(DMA) 0 0 65536 0 0 16
size-65536 0 0 65536 0 0 16
size-32768(DMA) 0 0 32768 0 0 8
size-32768 2 2 32768 2 2 8
size-16384(DMA) 0 0 16384 0 0 4
size-16384 2 3 16384 2 3 4
size-8192(DMA) 0 0 8192 0 0 2
size-8192 3 4 8192 3 4 2
size-4096(DMA) 0 0 4096 0 0 1
size-4096 66 67 4096 66 67 1
size-2048(DMA) 0 0 2048 0 0 1
size-2048 8 10 2048 4 5 1
size-1024(DMA) 0 0 1024 0 0 1
size-1024 39 40 1024 10 10 1
size-512(DMA) 0 0 512 0 0 1
size-512 38 48 512 5 6 1
size-256(DMA) 0 0 256 0 0 1
size-256 41 45 256 3 3 1
size-128(DMA) 3 30 128 1 1 1
size-128 568 600 128 19 20 1
size-64(DMA) 0 0 64 0 0 1
size-64 305 354 64 6 6 1
size-32(DMA) 52 59 64 1 1 1
size-32 400 1121 64 19 19 1

        total: used: free: shared: buffers: cached:
Mem: 1054724096 1048174592 6549504 0 5664768 929890304
Swap: 1077501952 36356096 1041145856
MemTotal: 1030004 kB
MemFree: 6396 kB
MemShared: 0 kB
Buffers: 5532 kB
Cached: 892792 kB
SwapCached: 15304 kB
Active: 57556 kB
Inactive: 920424 kB
HighTotal: 131008 kB
HighFree: 1064 kB
LowTotal: 898996 kB
LowFree: 5332 kB
SwapTotal: 1052248 kB
SwapFree: 1016744 kB



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 15 2001 - 21:00:41 EST