Re: 100% / and swap usage

Jean-David Beyer <jeandavid8@xxxxxxxxxxx> writes:

LinuxOS wrote:

My Linux machine is getting out of disk usage, following is the df
command output. Kindly give suggestions on this.

[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 15G 14G 0 100% /
/dev/sda1 190M 8.6M 172M 5% /boot
none 252M 0 252M 0% /dev/shm
/dev/sda3 1012M 1012M 0 100% /swap
/dev/sda5 487M 11M 451M 3% /tmp


Something must be wrong. It is really unlikely that the root file system

Look at his disk. His root is the whole file system. /tmp/and /boot don't
take up room.
He has both a memory leak (using up swap) and a memory used up.

Go to /var/ and make yourself some room. Then as he suggests do
du -s /*
and look to see where the memory is being used.

should use 15G of space. Here is mine -- at least the mounted stuff. I have
a lot of disk space (6 hard drives), so some of these partitions are
unusually large. On mine, there is no /swap file; it is 4 separate
partitions, one on each of 4 drives. This turns out to be unnecessary for me
because I have so much RAM that swap seems never to be used.

$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 2.0G 339M 1.6G 18% /
/dev/hda11 16G 2.0G 14G 13% /boinc
/dev/hda1 373M 12M 342M 4% /boot
/dev/hda10 950M 91M 850M 10% /dataA
/dev/hdb1 3.8G 13M 3.8G 1% /dataB
/dev/sda3 7.3G 2.4G 4.5G 35% /home
/dev/hdb2 19G 1.6G 17G 9% /homeB
/dev/hda8 4.0G 999M 2.8G 27% /opt
/dev/hda6 7.9G 36M 7.5G 1% /tmp
/dev/hda2 9.9G 3.0G 6.5G 32% /usr
/dev/hda9 2.5G 287M 2.1G 12% /usr/local
/dev/hda7 4.0G 455M 3.3G 12% /usr/src
/dev/hda5 7.9G 2.2G 5.4G 29% /var
none 4.0G 0 4.0G 0% /dev/shm

Yee gads you have separate /usr, /usr/local, /home. He does not. If you add
yours up you get 7 GB used. (2.2G in /var? That is nuts!)

Do you run your system 24/7? If not perhaps your logrotate and tmpwatch
programs do not get run and they are full of stuff. You might wish to run

du / | sort -nr | less and see what is gobbling up all that space. On my
machine, it would show:

17439855 /
4042028 /proc
3737576 /usr
2463928 /home
2444228 /home/jdbeyer
2228616 /var
2077444 /var/local
2077300 /var/local/downloaded
1995376 /boinc
1978500 /boinc/projects
1564544 /usr/lib
1564220 /homeB
1564200 /homeB/jdbeyer
1539668 /var/local/downloaded/IBM
1326696 /boinc/projects/
1167784 /homeB/jdbeyer/stocks
1167780 /homeB/jdbeyer/stocks/DATA
1118196 /home/jdbeyer/mp3
1043940 /usr/share
990128 /opt
908968 /usr/lib/openoffice

Note that /proc is not an issue.

.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey
^^-^^ 16:10:01 up 7 days, 22:48, 3 users, load average: 4.17, 4.20, 4.21

Relevant Pages

  • Re: mdconfig unable to allocate memory
    ... > one ensure that all the memory is being used for suitable file caching ... > disk, really; I assumed that it would immediately start dumping ... > anything I put in it, into swap, causing disk access. ... file system with 4GB of RAM without a problem, ...
  • [opensuse] Re: How to reclaim performance lost over gradual slowdown?
    ... progressively sluggish over time. ... Are you running lower on memory? ... What type of disk do you have and what type of file system do you ...
  • OT/drift: when is a RAMdisk an appropriate solution
    ... include the "ram disk" component in your project. ... Sometimes, a physical RAM ... only to wind up going directly to regular old ordinary memory, ... testing the file system software. ...
  • Re: [opensuse] why /var/run and /run these two directories have absolutely the same contents?
    ... tmpfs on /run type tmpfs ... I don't think /var/run is occupying hard disk space just like /run. ... One Upon a time someone wrote a file system driver for the V7 PFDPD-11, ... In that context, pre networking pre FFS, memory maxing ...
  • Re: Memory mapped File System
    ... I'm daily generating a DB in 2 formats sqlite and h2 that arrives to ... isn't a problem so I'm guessing that the disk is the bottle neck. ... Something like Memory Mapped Files (if I understood the ... File System if the all process is faster. ...