On 2/21/2018 1:30 PM, Susheel Kumar wrote: > I did go thru your posts on swap usage http://lucene.472066.n3. > nabble.com/Solr-4-3-1-memory-swapping-td4126641.html and my situation is > also similar. Below is top output from our prod and performance test > machine and as you can see the swap utilization on Prod machine is 44% > while on test machines it is zero.
Are those "top" outputs sorted by the default (CPU usage) or by memory? To make any useful determination, it needs to be by memory. Press shift-M to sort by memory if your top program supports that key. Also, the list only shows the first few processes. More of the list needs to be visible. The system load on the second "top" output is quite low, and doesn't show much used CPU percentage. So it looks like the system is not actually suffering due to the swap usage, which probably means that it is not actively swapping. The machine has plenty of memory available -- even though almost all of the memory is allocated, the vast majority of what's allocated is in the "cached" state -- used by the OS disk cache. The OS will instantly give up this memory if a program requests it. I've learned how to use top to show which processes are using swap. What I've described below should work on recent version of gnu top. If the top is from another software provider, it may not support this. http://northernmost.org/blog/swap-usage-5-years-later/ These steps are not precisely as described in that blog post: Run top, press f, press p, press space, then press the right angle bracket (>) key three times. If top is running with default settings, these keypresses should enable the SWAP column and move the sort to that column. The list should be sorted by swap usage. If a .toprc file exists in your home directory, then the program may be running with very different settings than default, and these keypresses might not work as expected. Thanks, Shawn