Subj : Re: linux memory To : comp.os.linux From : hopehope_123 Date : Fri Sep 10 2004 12:49 am Hi Micahel , Thanks for your help. How can i understand that paging is a problem? vmstat 5 has three columns , swpd ,si,so . procs memory swap io system cpu r b w swpd free buff cache si so bi bo in cs us sy id 1 29 1 3151552 137264 28624 2891840 20 11 15 11 8 1 23 18 2 20 21 2 3151440 103664 20592 2922528 3392 0 26561 16414 8693 19557 71 7 22 I have 3gb swap in use and some values in si and so. Now s it possible to say that paging activity occurrs and it is a problem? Kind Regards, hope michael1cat@yahoo.com (Michael Paoli) wrote in message news:... > hopehope_123@yahoo.com (utkanbir) wrote in message news:... > > > This is related to linux / oracle , i have asked this question to > > oracle support also . > > > My box is hp , redhat linux advanced server 2.4.18-e.37smp , 4 itanium > > 64 cpus , 8gb.ram and oracle 9.2.0.5 with rac (2 nodes) . I use ocfs , > > this is a tb.level datawarehouse . My question is related to memory > > usage of linux. > > Although i have 8gb. of ram , oracle shared memory is about > > 1.6gb.(ipcs) . My swap size is 24gb. When i check the system by using > > top , etc.... , i see most of the memory is used , and a great amount > > of memory is used by linux for disk cache. This is the /proc/meminfo > > output: > > total: used: free: shared: buffers: cached: > > Mem: 8490827776 6121046016 2369781760 0 29163520 1254342656 > > Swap: 25165725696 1141850112 24023875584 > > MemTotal: 8291824 kB > > MemFree: 2314240 kB > > MemShared: 0 kB > > Buffers: 28480 kB > > Cached: 1040144 kB > > SwapCached: 184800 kB > > Active: 3157680 kB > > Inact_dirty: 401984 kB > > Inact_clean: 16656 kB > > Inact_target: 715264 kB > > HighTotal: 0 kB > > HighFree: 0 kB > > LowTotal: 8291824 kB > > LowFree: 2314240 kB > > SwapTotal: 24575904 kB > > SwapFree: 23460816 kB > > Committed_AS: 16057008 kB > > HugePages_Total: 0 > > HugePages_Free: 0 > > Hugepagesize: 262144 kB > > > Look at the cached value , here it is about 1gb, , this number reaches > > up to 6gb. I read some articles about linux memory management ,which > > says such a thing is expected behaviour for linux (if there is memory > > use it instead of waste) . But the value increase too much that the > > machine starts paging. (look at the swap values above) And most > > importantly , i use ocfs which uses direct io , so do i get any > > benefit of this linux disk cache? (since direct io does not use any os > > buffer ) Why does linux incrase the cache size too much and than > > starts paging? Whats the benefit of swapping ? Why does not linux > > prevents allocation of cache memory and stop swapping? > > I don't see that you've got much of anything to be worried about. Note > that your SwapFree is almost as large as your SwapTotal, so you've got > little swapped out relative to the swap space you have and even > relative to the RAM you have. I'm not a linux kernel swap expert, > but I'd guestimate the kernel took upon itself to swap out some quite > stale stuff (e.g. process that has large footprint but has been waiting > a long time for some event to occur and that event still hasn't happened > or a very inactive file using tmpfs) so that the kernel instead can use > that RAM for better performance on much more active processes. > > Disk caching improves performance in lots of areas, so it's not useless > in the case of Oracle, however in some cases, locations, and with some types > of databases and/or their data it may be undesirable at least in part > (e.g. some databases that would prefer to talk directly to disk/LUN > devices or filesystem files without the operating system attempting to > buffer/cache the I/O, as that may be redundant or undesired by the database). .