July 20th, 2007

Linux Tips: Who is using the RAM

When the Pc is unexpectedly slow its difficult to know what program is slowing it down. It could be the many processes in execution, or insufficient RAM or excessive use of the virtual memory (the swap)
The fastest way to diagnose this situation is to verify how the system is using the RAM. The free command displays the total amount of free and used physical memory and swap space in the system, as well as the buffers and cache consumed by the kernel.
 
The free command has many flags; -b, -k, -m or -g. These flags have in common the same objective , to change the units of measurement with which to show the data (byte, Kbyte, Mbyte and Gbyte) e.g

~$ free -m

The -s flag, followed by a number indicates the number of seconds that free would continuously display the data. Finally with the -t option, free displays the total value (free and used) of the memory in general; physical memory (the RAM), virtual memory (the swap partition)

IF the RAM is really crowded, then there are two things to be done;
1)Try to reduce the RAM consuming “Services” or get more RAM
2)A fast remedy is increasing the swap space to permit more dumping from the RAM. In Linux 512MB of RAM seem to be 1024 RAM unlike in Windows where 512MB practically become something like 212MB. So the Swap has a good rule to play in Linux. (Welcome to the Linux world where you are bound to spend less) Spending one half or one percent of your disk on swap can probably improve performance.
The best remedy, of course is getting more RAM.

Social Bookmarks:
These icons link to social bookmarking sites where readers can share and discover new web pages.
TrackBack Link Comment »

3 Comments;

  1. Configure Firefox to consume less RAM.

    […] Kabatology:Open Source, Linux: Who is Using the Ram […]

  2. Jay

    Thanks for the article. Learning more commands on Linux everyday.

  3. Linux patarimai #6 : nežinau.lt

    […] jeigu jÅ«sų kompiuteris veikia labai lÄ—tai ir jÅ«s neįsivaizduojate kodÄ—l, tada galite pasinaudoti Å¡iuo patarimu ir paprasta komanda sužinoti kurios programos ir kurie veiksmai „suvalgo“ visÄ… jÅ«sų operacinÄ™ atmintį […]

Subscribe to Comments RSS

Leave a Comment or a Question;