29 10月, 2025
0 Comments
1 category
ClamAVがメモリを大量消費しており、サーバーが重くなった。6Tの4,200rpmのHDDを追加してしまったので、それが原因かも。
/usr/lib/systemd/system/clamd@.serviceを編集することでメモリ量やCPUの占有率などを制限することができるそうです。
[Unit]
Description = clamd scanner (%i) daemon
Documentation=man:clamd(8) man:clamd.conf(5) https://www.clamav.net/documents/
After = syslog.target nss-lookup.target network.target
[Service]
Type = forking
ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf
# Reload the database
ExecReload=/bin/kill -USR2 $MAINPID
Restart = on-failure
TimeoutStartSec=420
#IOSchedulingPriority = 7
#CPUSchedulingPolicy = other
#CPUSchedulingPriority = 5
MemoryLimit=512M
CPUQuota=30%
#Nice = 19
[Install]
WantedBy = multi-user.target Category: Uncategorized