Does modifying /etc/systemd/system.conf require reboot or just systemctl daemon-reload in CentOS 7?


2 views

When modifying /etc/systemd/system.conf in CentOS 7, it's crucial to understand how systemd handles configuration changes. This file contains core systemd manager configuration parameters that affect the entire system.

For most changes in system.conf, systemctl daemon-reload is sufficient to apply modifications. This command:

# Reload systemd manager configuration
sudo systemctl daemon-reload

This works for parameters like:

  • LogLevel changes
  • DefaultTimeoutStartSec/StopSec
  • DefaultEnvironment variables

Some specific parameters require a full system reboot to take effect:

# These changes need reboot:
[Manager]
DefaultLimitNOFILE=100000
DefaultLimitNPROC=50000
CPUAffinity=0,1

Resource limit changes and CPU affinity settings typically require reboot because they affect kernel-level configurations.

To check if your changes took effect without reboot:

# Check current log level
systemctl show -p LogLevel

# Verify environment variables
systemctl show --property=Environment

Recommended workflow for system.conf modifications:

  1. Make backup: sudo cp /etc/systemd/system.conf /etc/systemd/system.conf.bak
  2. Edit configuration file
  3. Run sudo systemctl daemon-reload
  4. Test affected services
  5. Reboot only if specific parameter requires it

For production systems, consider testing changes in staging first, especially for parameters that might require reboot.


In CentOS 7, systemd reads configurations from multiple locations with /etc/systemd/system.conf being the primary global configuration file. When you modify this file, you're changing system-wide settings that affect all units and the systemd manager itself.

The /etc/systemd/system.conf contains core parameters like:

[Manager]
#LogLevel=info
#LogTarget=journal-or-kmsg
#DefaultTimeoutStartSec=90s
#DefaultTimeoutStopSec=90s

These settings control fundamental behaviors of systemd's core process, not individual units.

While systemctl daemon-reload works well for unit files, it has limitations with system.conf:

# This reloads unit files but not system.conf changes
sudo systemctl daemon-reload

The command primarily notifies systemd to re-read unit file definitions, not core configuration.

For changes to take effect in these scenarios:

  • Modifications to [Manager] section parameters
  • Changes to CPU affinity or memory limits
  • Adjustments to watchdog settings

Example needing reboot:

[Manager]
DefaultCPUAccounting=yes
DefaultMemoryAccounting=yes

You can check if changes were applied without rebooting:

# Check current Manager properties
sudo systemctl show --property=DefaultTimeoutStartSec

# Compare with your system.conf setting
grep DefaultTimeoutStartSec /etc/systemd/system.conf

For testing purposes, you can override settings without modifying system.conf:

# Temporarily set a parameter
sudo systemd-analyze set-log-level debug

# Verify temporary change
systemctl log-level
  1. Always test changes in staging first
  2. Document all modifications to system.conf
  3. Schedule reboots during maintenance windows
  4. Use systemd-analyze verify to check configuration