Saturday, December 14, 2013

Kernel Memory Utilisation

www.unixbabuforum.inI have Huge kernel memory utilisation on server with ZFS . 

Can any one suggest where to look for more details of the kernel memory 
usage and how to reduce it. 

# mdb -k 
Loading modules: [ unix genunix specfs dtrace zfs sd mpt px ssd fcp fctl ip 
qlc hook neti sctp arp usba nca md cpc random crypto wrsmd fcip logindmux 
ptm ufs sppp nfs ipc ] 
> ::memstat 
Page Summary Pages MB %Tot 
------------ ---------------- ---------------- ---- 
Kernel 7668002 59906 62% 
Anon 4212049 32906 34% 
Exec and libs 55094 430 0% 
Page cache 38516 300 0% 
Free (cachelist) 13532 105 0% 
Free (freelist) 371690 2903 3% 
Total 12358883 96553 
Physical 12336996 96382 
/usr/local/bin/top 
last pid: 9021; load avg: 6.96, 7.45, 7.04; up 
71+15:39:34 14:10:20 
2533 processes: 2524 sleeping, 9 on cpu 
CPU states: 88.1% idle, 8.7% user, 3.2% kernel, 0.0% iowait, 0.0% swap 
Memory: 96G phys mem, 2981M free mem, 165G total swap, 165G free swap 

# prstat -a 

NPROC USERNAME SWAP RSS MEMORY TIME CPU 
1343 oracle 36G 33G 35% 1620:24:1 16% 
71 root 424M 456M 0.5% 179:10:51 0.8% 
6 daemon 7896K 8536K 0.0% 2:37:39 0.0% 
1 noaccess 78M 94M 0.1% 9:08:17 0.0% 
1 smmsp 1424K 6448K 0.0% 0:00:19 0.0% 
# kstat -m zfs 
module: zfs instance: 0 
name: arcstats class: misc 
c 44440575748 
c_max 100170227712 
c_min 12521278464 
crtime 185.6402144 
deleted 1902498 
demand_data_hits 47144615530 
demand_data_misses 3973719 
demand_metadata_hits 103761465 
demand_metadata_misses 254599 
evict_skip 22078425 
hash_chain_max 7 
hash_chains 168706 
hash_collisions 9936148 
hash_elements 971236 
hash_elements_max 973924 
hdr_size 163224936 
hits 48717031534 
l2_abort_lowmem 0 
l2_cksum_bad 0 
l2_evict_lock_retry 0 
l2_evict_reading 0 
l2_feeds 0 
l2_free_on_write 0 
l2_hdr_size 0 
l2_hits 0 
l2_io_error 0 
l2_misses 0 
l2_rw_clash 0 
l2_size 0 
l2_writes_done 0 
l2_writes_error 0 
l2_writes_hdr_miss 0 
l2_writes_sent 0 
memory_throttle_count 0 
mfu_ghost_hits 2760977 
mfu_hits 47369424685 
misses 5242901 
mru_ghost_hits 793071 
mru_hits 14033793 
mutex_miss 8267 
p 2717414937 
prefetch_data_hits 133404319 
prefetch_data_misses 958828 
prefetch_metadata_hits 1335250220 
prefetch_metadata_misses 55755 
recycle_miss 143648 
size 44440205408 
snaptime 6192868.6678489 
module: zfs instance: 0 
name: vdev_cache_stats class: misc 
crtime 185.6403541 
delegations 559486 
hits 958791 
misses 201613 
snaptime 6192868.6697353


www.unixbabuforum.inYou can adjust the amount of memory zfs uses by setting 
zfs:zfs_arc_max in the /etc/system file ( you will have to reboot). 
Example: 
* Limit zfs memory usage to 8 G byes 
set zfs:zfs_arc_max=8192000000 


You can see zfs memory in kernel by running the following command as root 

kstat zfs::arcstats:size 


www.unixbabuforum.inYou can run the "sdtprocess" GUI and sort by RAM or you can use the 
"ps" command. "ps -e -orss,vsz,args | sort -nr| more"

www.unixbabuforum.inThe ::kmastat command in mdb will give you a detailed breakdown of where 
your kernel memory is being used. It takes a while (a few minutes) to run, 


0 comments:

Post a Comment

 
Design by BABU | Dedicated to grandfather | welcome to BABU-UNIX-FORUM