Want to subscribe to topics you're interested in?
Become a Member

Beta Branch add tools/journald-set.sh to optimise systemd journald log memory usage in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Jun 11, 2020.

  1. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:28 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    add tools/journald-set.sh to optimise systemd journald log memory usage in 123.09beta01

    - ensure CentOS 7+ systemd journald logging doesn't consume more memory than available on system leading to /var partition running out of disk space or running into out of memory conditions like at https://community.centminmod.com/threads/could-not-create-lock-at-var-run-yum-pid-errno-28-no-space-left-on-device.19492/#post-82913
    - existing CentOS 7 servers with Centmin Mod 123.09beta01 or newer can do a manual cmupdate command and then run the SSH command below manually

    /usr/local/src/centminmod/tools/journald-set.sh config

    Continue reading...


    123.09beta01 branch
     
  2. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    7:28 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    I think everything is OK

    Code (Text):
    /usr/local/src/centminmod/tools/journald-set.sh config
    
    journalctl --disk-usage
    Archived and active journals take up 32.0M on disk.
    set SystemMaxUse=179M in /etc/systemd/journald.conf
    set RuntimeMaxUse=179M in /etc/systemd/journald.conf
    
    
    journalctl --disk-usage
    Archived and active journals take up 32.0M on disk.
    
    change journald logging from memory based to disk based at /var/log/journal/
    â— systemd-journald.service - Journal Service
       Loaded: loaded (/usr/lib/systemd/system/systemd-journald.service; static; vendor preset: disabled)
       Active: active (running) since Thu 2020-06-11 02:28:52 CEST; 2s ago
         Docs: man:systemd-journald.service(8)
               man:journald.conf(5)
     Main PID: 19521 (systemd-journal)
       Status: "Processing requests..."
       CGroup: /system.slice/systemd-journald.service
               └─19521 /usr/lib/systemd/systemd-journald
    
    Jun 11 02:28:51 hostname systemd-journal[19521]: Runtime journal is using 32.0M (max allowed 179.0M, trying to leave 586.5M free of 3.7G available → current limit 179.0M).
    Jun 11 02:28:52 hostname systemd-journal[19521]: Journal started
    
    journalctl --disk-usage
    Archived and active journals take up 32.0M on disk.
     
  3. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:28 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    looks good :)