On 10/5/06, Ajitabh Pandey अिजतााभ पांडे <[EMAIL PROTECTED]> wrote: > > Very recently (around a month or so back) the system is appearing more > busier and some slowness has also been reported by users.
Did you do any changes around that time ? Initial > thought of memory leaks (it runs lots of java xml transformations after > extracting data from database) in some java code are out of question > as the performance is same even after a planned reboot. While > investigating the same I had some questions about the system, after > having a look at the RRDTool graphs. > > (1.) A 6 weeks RRDTool graph shows me an average usage of 28GB RAM as > cached and 1GB free. While maximum cached is 30 GB and maximum free > is 21GB. Who decides how much RAM is to be cached, kernel? Is it > controllable? Its the kernel which decides how much RAM is cached. The thing is that cached memory is actually free. It can be immediately used if a program needs memory. Linux tries to keep a large cache just in case if that data is required again, it can be quickly fetched from the memory which would be hundreds of times faster that fetching it from the hard disk. Which kernel are you using ? You can try tweaking the parameters in /proc/sys/vm BUT only after understanding them very well. I would rather avoid it. > > (2.) At times I have seen that even if I had 10GB of free RAM the > system was still swapping. Infact I havent seen the swap space zero at > any point of time on these servers. Why? > The swap space statictics over a 6 weeks period are - > Server 1 - average swap usage 170MB and max usage 1GB > Server 2 - average swap usage 194MB and max usage 2GB > Increase in swap usage has been observed when number of java xml > transformations are running. It is quite possible that kernel is making a wrong choice and swapping unnecessarily. When some application needs memory and all the RAM is used the kernel can either reduce the disk cache in the RAM by eliminating the oldest data or it may swap some pages to hard disk. If you are using a 2.6 kernel, you can actually tune swappiness. There is a parameter /proc/sys/vm/swapiness which can be assigned a value between 0 and 100 to either eliminate or always force swapping. You can also use /etc/sysctl.conf to set the value of vm.swappiness when the system boots up. > > If any of you can suggests anything to improve on performance. You can also check if your kernel supports Drop Caches through /proc/sys/vm/drop_caches This can be used to free lot of memory by making the kernel drop page cache and dentries and inodes. The > application (which includes java code) is heavy on CPU (which is maxed > out almost all the times). Is your application releasing memory when not using it. What is the size of the java process ? There might not be any memory leaks but its very much possible that your application is not releasing memory. > > Regards. > -- > Ajitabh Pandey -- Manish Kathuria Tux Technologies http://www.tuxtechnologies.co.in/ ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-india-help mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-india-help
