# Ensure journald Is Configured to Compress Large Log Files

- Source: https://support.icompaas.com/support/solutions/articles/62000235537-ensure-journald-is-configured-to-compress-large-log-files
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [CIS Amazon Linux 2 Benchmark v3.0.0](https://support.icompaas.com/support/solutions/62000112696) › [CIS Amazon Linux 2 Benchmarks](https://support.icompaas.com/support/solutions/folders/62000169265)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

Profile Applicability: **• Level 1**

Description:  
 Compressing large log files in systemd’s journal (journald) reduces disk space usage by minimizing the storage size of archived logs, helping maintain efficient log storage management.

Rationale:  
 Enabling compression of log files saves disk space, supports longer log retention periods, and improves overall system storage efficiency.

Impact:  
 Pros:

-   Reduces disk space consumption for log storage.  
    
-   Enables retention of more historical logs.  
    

Cons:

-   Compression and decompression require additional CPU resources.  
    

Default Value:  
 journald may have compression enabled by default, but it should be verified against site policies.

Pre-requisites:

-   Root or sudo privileges to modify journald configuration.  
    

Remediation:

### Test Plan:

Using Linux command line:

Check the current compression setting in /etc/systemd/journald.conf:  

grep "^Compress" /etc/systemd/journald.conf

Verify if Compress=yes is set.

### Implementation Plan:

Using Linux command line:

Edit /etc/systemd/journald.conf:  

vi /etc/systemd/journald.conf

Set the compression parameter:  

Compress=yes

Save the file and restart journald:

systemctl restart systemd-journald

Confirm compression is enabled:  

grep "^Compress" /etc/systemd/journald.conf

Backout Plan:

Using Linux command line:

Disable compression if needed by setting:

Compress=no

Restart journald service:

systemctl restart systemd-journald

References:

-   CIS Amazon Linux 2 Benchmark v3.0.0  
    
-   systemd-journald Documentation  
    
-   [NIST SP 800-53 Revision 5 - SI](https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final#si-4)[\-4](https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final#si-4)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
