On Wed, 2007-08-22 at 12:02 +0900, nac wrote:
> Hi all,
> now I'm using JFS on Gentoo linux (Kernel 2.6.19) box.
> This box is really simple (no great cpu, no RAID) just for
> testing. I'm curious about memory usage of JFS.
> 
> This box has 512 MB RAM and uses less than 20 MB ram before many
> disk access, like find command for /usr/portage.
> But after that, memory utilization has fairly increased.
> In slabtop, jfs_ip seems using memory.
> 
> The portage directory has a lots of small files, its size is at most 10kb and
> average file size is much more smaller than 10kb.
> And number of files is over 120000.
> 
> 
> <<before "find /usr/porage">>
> $ free
>              total       used       free     shared    buffers     cached
> Mem:        491912      30536     461376          0         24      16076
> -/+ buffers/cache:      14436     477476
> Swap:      1004052          0    1004052
> 
> 
> <<after "find /usr/portage">>
> $ free
>              total       used       free     shared    buffers     cached
> Mem:        491912     348784     143128          0         24     159220
> -/+ buffers/cache:     189540     302372
> Swap:      1004052          0    1004052
> 
> $ cat /proc/slabinfo 
> slabinfo - version: 2.1
> # name            <active_objs> <num_objs> <objsize> <objperslab> 
> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata 
> <active_slabs> <num_slabs> <sharedavail>
> <<<snip>>>
> jfs_mp             36275  36305     72   53    1 : tunables  120   60    8 : 
> slabdata    685    685      0
> jfs_ip            151376 151376    876    4    1 : tunables   54   27    8 : 
> slabdata  37844  37844      0
> udf_inode_cache        0      0    380   10    1 : tunables   54   27    8 : 
> slabdata      0      0      0
> <<<snip>>>
> 
> JFS(jfs_ip) memory utilization is not small, I think.
> Is this memory utilization is normal?

Yes this is normal.  jfs has a larger in-memory inode than most file
systems, but I'm not aware that it causes any real problems.

> And memory utilization stays at the level, so I don't think memory
> leaking, this is correct?

Yes, it's correct.

Applications that stat a lot of files without reading any data from
them, like find and updatedb, will cause a lot of file data to be cached
in the inode cache, and directory cache (dcache).  These caches will
shrink when the memory is needed for something else, but the linux
kernel won't try to free cached data unnecessarily.

If you have issues with high inode cache and dcache usage causing useful
data to be swapped out of memory, you may be interested in
tuning /proc/sys/vm/vfs_cache_pressure.  A high number here (could be in
the thousands) will cause the kernel to try to free inode cache and
dcache more aggressively.

> $ cat /proc/meminfo 
> MemTotal:       491912 kB
> MemFree:        141732 kB
> Buffers:            24 kB
> Cached:         160136 kB
> SwapCached:          0 kB
> Active:         149048 kB
> Inactive:        17432 kB
> HighTotal:           0 kB
> HighFree:            0 kB
> LowTotal:       491912 kB
> LowFree:        141732 kB
> SwapTotal:     1004052 kB
> SwapFree:      1004052 kB
> Dirty:               4 kB
> Writeback:           0 kB
> AnonPages:        6340 kB
> Mapped:           5052 kB
> Slab:           178424 kB
> SReclaimable:   172260 kB
> SUnreclaim:       6164 kB
> PageTables:        292 kB
> NFS_Unstable:        0 kB
> Bounce:              0 kB
> CommitLimit:   1250008 kB
> Committed_AS:    57844 kB
> VmallocTotal:   532472 kB
> VmallocUsed:      6824 kB
> VmallocChunk:   525060 kB
> 
> 
> $ cat /proc/version 
> Linux version 2.6.19-gentoo-r5 ([EMAIL PROTECTED]) (gcc バージョン 4.1.1 (Gentoo 
> 4.1.1)) #1 SMP Tue Mar 6 12:52:45 JST 2007
> 
> -------
> nac.
> [EMAIL PROTECTED]
-- 
David Kleikamp
IBM Linux Technology Center


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Jfs-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jfs-discussion

Reply via email to