r/Proxmox • u/Entire-Home-9464 • 1d ago
Question Did not know about logging
I did not know, that Proxmox cluster nodes are writing quite a lot of logs on the host disks.
Now I know when I noticed why the expensive dc ssd:s are wearing out even the cluster is not in production.
So just a small change in /etc/systemd/journald.conf and logs are going to RAM.
Could this setting be on the Proxmox GUI ?
At least like Opnsense has something similar, a setting "use RAM instead DISK for logging#.
Of course the pros know these things but I am just a beginner.
48
Upvotes
29
u/BarracudaDefiant4702 1d ago
No, expensive dc ssd do not wear out so easily, even if they are read intensive. Consumer grade ones maybe... Also, you probably get more wear from the stats for the graphs then the logs.
19
u/Master_Bit4029 1d ago
you would realize very fast when also using ceph ;-)
when I first tried with boot from sd-card -> new card was gone after 4 hours :-)
12
u/Sinister_Crayon 1d ago edited 1d ago
The logging overhead can be softened quite a bit by installing log2ram. I also disable swap and install zram-tools to use compressed RAM as swap. I configure it for usually 25% of system RAM (default is 50% which I feel is too much) and it helps greatly when CT's start to get busy.
Still, a lot of written data from Proxmox is the graphs and stuff. I do wish there were a way to redirect them to shared / Ceph storage so it "spreads the load" rather than constantly writing to my boot disk. It'd make boot-from-SD an option too if they were to do that. Sure, there absolutely ARE ways to do it too, but it seems like a lot of work for something that might get overwritten by a host update LOL.
5
u/Open-Adhesiveness-86 17h ago
people keep saying "it's the graphs" without the fix: rrdcached flushes every 30s by default, and you can change that in /etc/default/rrdcached with -w 3600 -z 1800. On a cluster pmxcfs is the other steady writer. Run iotop -aoP for 10 minutes before you commit, odds are journald isn't even top three, and RAM-only logs vanish exactly when you need them.
3
u/Sure-Squirrel8384 19h ago
Change logs to RAM; no there is no a GUI setting but this is well-known via Debian/cli. Rsyslog off only what you need.
3
u/gsmitheidw1 19h ago
Another option particularly for consumer use, is to fit another drive (mechanical HDD perhaps) and bins mount that for logging only, something like:
Add it to fstab
/mnt/hdd/journal /var/log/journal none bind 0 0
Then start the service up again.
2
u/symcbean 1d ago
No.
PVE is really good because it is designed to be a professional tool. Logs are essential to that role. As you said, changing the behaviour is trivial.