Hi Bryan,

> Simon Reber <s.re...@lcsys.ch> wrote:
> > I know that Linux swaps the stuff which is not being used to disk
(we
> > already tweaking it with swappiness parameter).
> 
> My apologies for re-covering that.
I don't mind at all ;-)


> > My problem is that I can't see who is using the swap space (as you
can see
> > from below output) and therefore why it doesn't free up the space
when I
> > shutdown the application!
> 
> Your investigations into the /proc/(process) tree could be looped for
> all running processes, forks, etc...  It's been a bit since I looked
> at how the JRE actually executes and VM.
> 
> > bash-3.2# cd /proc/5048
> > bash-3.2# export SUM=0
> > bash-3.2# for SWAP in `grep Swap $DIR/smaps 2>/dev/null| awk '{
print $2
> > }'`; do let SUM=$SUM+$SWAP; done
> > bash-3.2# echo "Swap usage by: 5048 = $SUM"
> > Swap usage by: 5048 = 0
> > bash-3.2# cat smaps
> > 40000000-40009000 r-xp 00000000 c7:5dc0 9609
> > /usr/prog/sag/cjp/v16/jre/bin/java
Well I have a script that loops through all running processes, etc.
checked the used swap space and calculates the sum from all together.
When running the script, it always tells me: "Swap usage overall: 0" -
checking all processes on single base I only see 0

So I really don't understand how swap can be in use when no process has
a reference to it.
Maybe a little background the XML database requires having swap
available and it also seems to use it.

The problem is, when we stop the XML database (which is java) and the
Oracle Database, swap isn't freed up.
When I do a swapoff -a (when all applications are shutdown) it takes
like 2 hours to free it up and have it available for maintenance

I already raised a change today morning to bring swappiness down to 1 -
but my concern is that it won't fix the problem (change not yet approved
but hopefully soon).

Also, the server isn't very busy during normal operation (from I/O and
Load perspective) - only if they load the XML database with new data,
the load and I/O goes up.
Anyhow, I'd like to share some more kernel settings with you - maybe you
can see something we are doing wrong or at least where we can improve

kernel.shmmax = 56968879104 (this value is set by puppet to 75% of the
real available memory)
kernel.shmall = 4294967296
vm.max_reclaims_in_progress = 0
vm.pagecache = 100
vm.swap_token_timeout = 300     0
vm.vfs_cache_pressure = 100
vm.max_map_count = 65536
vm.percpu_pagelist_fraction = 0
vm.min_free_kbytes = 34511
vm.lowmem_reserve_ratio = 256   256     32
vm.swappiness = 60
vm.dirty_expire_centisecs = 2999
vm.dirty_writeback_centisecs = 499
vm.dirty_ratio = 40
vm.dirty_background_ratio = 10
vm.page-cluster = 3
vm.overcommit_ratio = 50

Thanks and all the best,
Si




_______________________________________________
rhelv5-list mailing list
rhelv5-list@redhat.com
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to