Mar 032014
 

Article by me, first published on Openlogic.com

Whether you are a system administrator or a developer, sometimes you need to consider the use of memory in GNU/Linux processes and programs. Memory is a critical resource, and limited memory plus processes that use a lot of RAM can cause a situation where the kernel goes out of memory (OOM). In this state Linux activates an OOM killer kernel process that attempts to recover the system by terminating one or more low-priority processes. Which processes the system kills is unpredictable, so though the OOM killer may keep the server from going down, it can cause problems in the delivery of services that should stay running.

In this article we’ll look at three utilities that report information about the memory used on a GNU/Linux system. Each has strengths and weaknesses, with accuracy being their Achilles’ heel. I’ll use CentOS 6.4 as my demo system, but these programs are available on any Linux distribution.

Continue reading »

Flattr this!

Oct 202013
 

As system administrator, or simple user that uses Linux on its desktop sometime you notice that something it’s eating all the memory of your system.
As first thing be sure to understand how Linux manage memory, I’ve be called too many time by scared users that did a free and were unable to read its output properly, in short, don’t worry if the Linux Kernel it’s using your memory to cache file.

< rant on >

To my “beloved” users:

Be assured that the Kernel developers can do a better job than you (and me) in find a good algorithm to cache file and free that memory area when a process need it, so please don’t ask me to put in cron some job that run something like that :

echo 3 > /proc/sys/vm/drop_caches

After that you’ll have more free memory available on the system, true, but the system will have to re-read all the files from the disk, so in terms of performance this is usually a bad move.

< /rant >

But now let’s take a look at a nice small program that can help us in find which process/users are using, for real, the memory of our systems.

Continue reading »

Flattr this!

Nov 042012
 

At the base of these articles there is a simple fact: a simple rm of a file or deleting it via any file manager is not enough to really remove it from your hard disk.

If you really want to delete files from a computer you have to use more sophisticated commands, and in former articles we have seen:

Dban: Darik’s Boot and Nuke (commonly known as DBAN) is an open source project hosted on SourceForge. The program is designed to securely erase a hard disk until data is permanently removed and no longer recoverable, which is achieved by overwriting the data with random numbers generated by Mersenne twister or ISAAC (a PRNG).

Shred : Overwrites the specified FILE(s) repeatedly, in order to make it harder for even very expensive hardware probing to recover the data.

Wipe : Wipe is a secure file wiping utility.

Today we’ll take a look at the package secure-delete that contains some useful programs to delete in a safer way files, memory, free space and/or the Swap space. Continue reading »

Flattr this!

Understanding the Top command on Linux

Understanding the Top command on Linux

Article by AlexioBash published on his website about ArchLinux in italian. Know what is happening in “real time” on your systems is in my opinion the basis to use and optimize your OS. On ArchLinux or better on GNU/Linux in general the top command can help us, this is a very useful system monitor that is really easy to […]

Linux memory management

Linux memory management

I think that is a common question for every Linux user soon or later in their career of desktop or server administrator “Why Linux uses all my Ram while not doing much ?”. To this one today I’ve add another question that I’m sure is common for many Linux system administrator “Why the command free […]