Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Debian 7 minimal template too much disk space?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Debian 7 minimal template too much disk space?

trexostrexos Member

Hello,

I just got a new VPS and the support reinstalled it with a custom template:
http://download.openvz.org/template/precreated/contrib/debian-7.0-amd64-minimal.tar.gz

I use this template on nearly every server and it needs about 300MB disk space, but on my new box df -h says used 900MB. I didn't install anything and I already tried apt-get clean which saved me 70MB. Is there a way to list the largest folders/files in Debian? I already used google and found a command, but the output doesn't seem reasonable.

Thank you :)

Comments

  • ncdu sounds like what you're after.

    Thanked by 1perennate
  • BluBoyBluBoy Member

    du / -h --max-depth=1
    ... then most likely: du /usr -h --max-depth=1

  • trexostrexos Member

    @saltspork said:
    ncdu sounds like what you're after.

    Thanks looks great :)

    @BluBoy said:
    du / -h --max-depth=1
    ... then most likely: du /usr -h --max-depth=1

    Output is:

    root@vserv03:/usr/share# du / -h --max-depth=1 1.4M /etc 5.1M /bin 4.0K /mnt du: cannot access/proc/2621/task/2621/fd/4': No such file or directory
    du: cannot access /proc/2621/task/2621/fdinfo/4': No such file or directory du: cannot access/proc/2621/fd/4': No such file or directory
    du: cannot access /proc/2621/fdinfo/4': No such file or directory 0 /proc 9.6M /lib 0 /sys 4.0K /selinux 4.0K /boot 4.0K /media 4.0K /lib64 44K /root 81M /var 26M /home 4.0K /srv 4.0K /tmp 117M /usr 4.0K /opt 5.0M /sbin 4.0K /dev 24K /run 244M /

    It looks like it says my whole system needs 244MB, doesn't it? Why does df -h tell me this:
    root@vserv03:/usr/share# df -h Filesystem Size Used Avail Use% Mounted on /dev/simfs 30G 908M 30G 3% / tmpfs 103M 24K 103M 1% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 461M 0 461M 0% /run/shm

    Regards

  • trexostrexos Member

    I don't get it, why does du say 244MB when df -h says 900MB?

  • df is showing you the space that is mounted on / du is showing you the space used in each of the directories... to match them up, add up all the space listed in du, minus the /run directory which is mounted seperately. looks like your /var, /usr, and /home directories are all mounted under /

  • netomxnetomx Moderator, Veteran

    And what's on /home ?

  • trexostrexos Member

    @netomx said:
    And what's on /home ?

    my little teamspeak server which uses 20MB :/

    Thanked by 1netomx
  • It might be the blocksize of the filesystem on the node, why bother about such a small problem?

  • trexostrexos Member

    @TheRedFox said:
    It might be the blocksize of the filesystem on the node, why bother about such a small problem?

    Can you explain that a bit more please?

    Well, I have 30GB and my teamspeak server needs 20MB, so I won't have any problems. But I just asked myself what causes this issue and I try to understand it :)

  • sleddogsleddog Member

    Blocksize, and/or open, unlinked files. Reboot and see if the numbers are closer.

    Or it could be all the dd test files in /dev/null...

    Thanked by 1hostnoob
  • @trexos

    Nice explaination:

    The block size specifies size that the filesystem will use to read and write data. Larger block sizes will help improve disk I/O performance when using large files, such as databases.

    This happens because the disk can read or write data for a longer period of time before having to search for the next block.

    On the downside, if you are going to have a lot of smaller files on that filesystem, like the /etc , there the potential for a lot of wasted disk space.

    For example, if you set your block size to 4096, or 4K, and you create a file that is 256 bytes in size, it will still consume 4K of space on your harddrive. For one file that may seem trivial, but when your filesystem contains hundreds or thousands of files, this can add up.

    Block size can also effect the maximum supported file size on some filesystems. This is because many modern filesystem are limited not by block size or file size, but by the number of blocks. Therefore you would be using a "block size * max # of blocks = max block size" formula.

    Source

  • trexostrexos Member

    @sleddog said:
    Blocksize, and/or open, unlinked files. Reboot and see if the numbers are closer.

    Or it could be all the dd test files in /dev/null...

    A reboot didn't fix it :/

    @TheRedFox
    ah I see thanks :) Do you think that these can make such a huge difference with a new installed VPS?

  • TheRedFoxTheRedFox Member
    edited May 2014

    @trexos said:
    ah I see thanks :) Do you think that these can make such a huge difference with a new installed VPS?

    I'm wondering too, maybe you can ask the host what blocksize they use and ask another host(with less diskspace used for debian7) to compare it with.

    (not sure if you can find out host file system properties on openvz)

    edit: I'm gonna experiment with it, will post my findings here tomorrow for you :)

  • trexostrexos Member

    @TheRedFox said:
    edit: I'm gonna experiment with it, will post my findings here tomorrow for you :)

    Thanks :) Looking forward to your results!

  • This is absolutely fine. Actually Debian 7.x takes about 900 MB of the disk space.

  • trexostrexos Member

    @rootwelt said:
    This is absolutely fine. Actually Debian 7.x takes about 900 MB of the disk space.

    This is a minimal, and the exact same template uses 300MB on all my other vps.

Sign In or Register to comment.