Welcome to Centmin Mod Community
Register Now

Some files eating up my SSD space in /home

Discussion in 'Install & Upgrades or Pre-Install Questions' started by EckyBrazzz, May 4, 2019.

  1. EckyBrazzz

    EckyBrazzz Active Member

    459
    90
    28
    Mar 28, 2018
    Brazil
    Ratings:
    +170
    Local Time:
    4:21 PM
    1.17.x
    10.3.x
    Noticed some files/directories in my /home that are using a lot of SSD space
    It's the .ccache and the usertmp_donotdelete both owned by root:root

    Don't have any idea were I got these as a extra friendly gift, but noticed it when creating backups and that it grew about 1GB more each day.

    Code (Text):
     ls -s -a
    total 195808
         0 .        4 acmesh-backups       0 centos         0 nginx
        16 ..       0 .ccache              0 mysqltmp  195788 usertmp_donotdelete
    
     
  2. eva2000

    eva2000 Administrator Staff Member

    40,620
    9,015
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,881
    Local Time:
    5:21 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    /home/usertmp_donotdelete is for your /tmp directory mount on small/low memory based servers based on a dynamic and automated formula centmin.sh uses on initial install as on centos 7 by default /tmp is memory ram disk mounted as tmpfs but if you have low memory available, then that can potentially be very bad for your data integrity where it relies on /tmp. Example if you only have 1GB memory, then centos 7 default /tmp on non-centmin mod systems with on ram disk backed by memory via tmpfs filesystem. Now if your web app/software relies on writing and reading and manipulating data on /tmp, you can run out of memory very easily as /tmp with tmpfs ram disk mount is usually 1/2 size of total memory. So 1GB memory server would create a /tmp with tmpfs ram disk mount with only 512MB capacity.

    This potential issue is on normal CentOS 7 installs systems and well many LEMP/LAMP stacks do not account for this. Centmin Mod on the other hand accounts for this so has a formula based on detected memory available/installed + size of your disk partitions i.e. /home as to how to switch /tmp from ramdisk tmpfs mount to on disk mounted via /home/usertmp_donotdelete created file which acts as your new /tmp disk and also as to size of /home/usertmp_donotdelete and thus size of /tmp on disk backed partition. So on initial Centmin Mod 123.09beta01 and newer installs, centmin.sh will make sure /tmp is configured optimally. If Centmin Mod detects more than 16GB memory installed though, it will allow CentOS 7 to use /tmp via ramdisk tmpfs mount and not create /home/usertmp_donotdelete.

    As to /home/.ccache that is for ccache compiler caching ccache — Compiler cache. It allows recompiles of nginx/php-fpm and php extensions of the same version i.e. making recompilations to be up to 80% faster than without ccache. So initial nginx compile may take 200 seconds, but recompile that same version with ccache enabled, it can be reduced to just 40-60 seconds.

    Might want to check out these threads which will shed some light :)
    Basically you're or maybe now using more disk space than you have available and need to upgrade your disk space on your VPS or move to VPS with more disk space if it's a problem as these are critical to optimal performance on your Centmin Mod server.

    You can use these commands to find where the disk space usage is going but do not go blindly deleting data as some of it would be for system operation so you can break your server deleting incorrect data.

    Code (Text):
    df -h
    du -h --max-depth=1 /
    du -h --max-depth=1 /home
    du -h --max-depth=1 /usr
    du -h --max-depth=1 /var
    

    For Centmin Mod Nginx vhost specific i.e. where you upload your site's files for your site files etc.
    Code (Text):
    du -h --max-depth=1 /home/nginx/domains
    

    any sensitive directory names for your site files etc can be masked by you manually as you don't want to publicly list them if possible
     
  3. EckyBrazzz

    EckyBrazzz Active Member

    459
    90
    28
    Mar 28, 2018
    Brazil
    Ratings:
    +170
    Local Time:
    4:21 PM
    1.17.x
    10.3.x
    Well, already did an upgrade to 8GB several days ago because I was hitting to 70% of free memory limit and noticed that it stopped the growth of the backups when I created the last one today. (just after posting this issue). Disk space, now I only use 46% so that's not the problem. Mounted a separate partition for the /home/ngixn in xfs format. This keeps me more flexible when Upgrading or when I notice that an upgrade was not necessary and can go back to another one with a smaller SSD to save some costs.

    Well gonna look into at this 16GB CPU optimized Droplets (16 GB,8 vCPUs Xeon Platinum) but they start at $120, so while in dev stage gonna put that idea in the freezer for a while. Gonna need a lot of them when leaving the dev stage.

    Thanks again for clarifying the existence of these files, was worried it was something bad. Guess it's safe to delete them when upgrading to the 16GB Droplets.

    Update: took a look at https://community.centminmod.com/threads/disk-space-is-going-away.5275/ and saved some space. Thanks for sharing!
     
    Last edited: May 4, 2019
    style="display:inline-block;min-width:400px;max-width:970px;width:95%;height:90px" data-ad-client="ca-pub-6669518204467592" data-ad-slot="4024536743" data-ad-format="auto">
  4. eva2000

    eva2000 Administrator Staff Member

    40,620
    9,015
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,881
    Local Time:
    5:21 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Help! Linux ate my RAM! for memory usage and for disk growth probably /home/.ccache related if you recently ran centmin.sh menu options that compile stuff as it populates ccache compiler cache

    centmin.sh auto /tmp optimization routine isn't for initial centmin mod installs. It won't trigger for upgrading memory on already existing centmin mod installs. So yes, you'd need to manually undo the /tmp on disk backed setups after upgrading memory.
     
  5. Jimmy

    Jimmy Premium Member Premium Member

    1,556
    321
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +800
    Local Time:
    3:21 PM
    1.15.x
    MariaDB 10.3.x
    Why don't you get an ovh server for $94 you get

    CPU: Intel Xeon E3-1230v6 - 4c/8t - 3.5GHz /3.9GHz
    RAM: 16GB DDR4 ECC 2400MHz
    HD: 2x 450GB and 1.2TB NVMe drives
    1 Gbps connection.

    Even SSDNodes is cheaper @ $19.99 per month for 1 year paid up front.

    Standard - 32GB RAM
    32GB ECC RAM
    160GB RAID10 SSD
    4x Intel E5/Gold vCPU
    16TB Transfer

    I use VPS at kayhosting.com on my busiest site and it works great.

    CPU 8x 3.30 GHz
    RAM 8 GB
    SSD 100 GB
    Bandwidth 8000 GB
    $24.99/MONTH

    Not sure why anyone would pay $120 a month for a droplet... I guess it's convenience as you can run them hourly and delete and restart on demand.
     
  6. eva2000

    eva2000 Administrator Staff Member

    40,620
    9,015
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,881
    Local Time:
    5:21 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    One valid reason is the underlying disk storage layer and it's resilience with some cloud vps providers. For dedicated server configs, to get the same equivalent disk layer resilience you'd need to start adding raid 10, 5, 6, 50, 60 which increases the relative dedicated bare metal server monthly costs far greater than some cloud vps providers. I say 'some' cloud vps providers as they all have different disk storage layer configs - some more resilient than others i.e. linode > vultr in terms of disk resilience.

    One reason why this forum runs on Linode VPS cloud - for it's disk resilience layer. Going dedicated for me would mean at least raid 10 which adds to dedicated hosting server costs :) Linode can easily clone and backup/restore snapshots across all it's Linode datacenters and migrate entire VPSes when disk arrays run into hardware issues.
     
    • Informative Informative x 1
  7. EckyBrazzz

    EckyBrazzz Active Member

    459
    90
    28
    Mar 28, 2018
    Brazil
    Ratings:
    +170
    Local Time:
    4:21 PM
    1.17.x
    10.3.x
    ovh is missing Amsterdam DC also