1832284 Members
2461 Online
110041 Solutions
New Discussion

Memory Problem

 
Bedare Nikhil
Advisor

Memory Problem

Hello,

What can be done if some users complain that their application is running very slow...When we checked the top command, it showed that the memory used by the appliations is very high...what needs to be done in this case ?
4 REPLIES 4
Adam Noble
Super Advisor

Re: Memory Problem

Hi,

You are a bit resticted as to what you can do except purchase more memory or make the code more efficient. If you can clearly see that the memory is being consumed by the application then either get your apps guys to clarify it can't be tuned or get more physical memory. If you have historical stats review memory over a period it may indicate an application leak if there has been a gradual rise over a period. Have a look at the RSS value in glance for each process or sort by memory to see the memory hogs. I reckon however you'll end up buying more memory.

Cheers
Ignacio Javier
Regular Advisor

Re: Memory Problem

Hi:

If it is not a problem with a process, and you need more Physical memory, you could first try to stop running process that you do not need.


Regards
Anshumali
Esteemed Contributor

Re: Memory Problem

Just check if the memory consumed is increasing after the application's 1st start. It may be a Memory Leak issue. Is there any other process which shouldnt be running? If you are restricted in increasing RAM, consider recompiling kernel after removing Device Drivers which you dont need and fine tune it.Also, always try to use nice top while you want to have a look at processes running.
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
Bill Hassell
Honored Contributor

Re: Memory Problem

The question is not easily answered. How do the users know that their application is running slow? Was it running faster in the past? If so, was there less of a load on the system at that time?

Memory usage is not important to performance until the usage exceeds physical RAM. At that point, processes will be deactivated and pages of memory will be written to the swap area. When this happens, system performance can drop as much as 100:1 or worse. The top command is not useful for memory issues -- it only reports on CPU usage. Use swapinfo -tm and vmtstat to determine paging activity. In vmstat, the column is po (ignore pi and other columns). Numbers over 10, especially over 50, indicate severe memory shortage. To fix this, reduce the number of users and processes on the system until vmstat reports less than 10 when the system is busy.

Or you can increase memory. You may need to add 4gb to 16Gb of RAM depending on what you need to run on this machine.


Bill Hassell, sysadmin