Strange ram utilisation

mauri_va

Member
Sep 8, 2021
5
0
6
52
I have a dedicated Proxmox Backup Server (version 3.1-2).
The PC is an HP N54L microserver with 16 Gb ECC RAM.
Four 1Tb HDDs are installed in ZFS Raidz.
Everything seems to work properly: VM backups, folder backups, Prune tasks, etc.
What strikes me as strange is that every now and then, even if no job is running on the server, the RAM remains occupied by more than 8Gb, exactly 53%, when normally the system 'in IDLE' occupies very little RAM. It seems that after a task that uses such RAM, the system is unable to free it when it is finished.
I do not understand what the problem is.
Do you have any suggestions?
 
ZFS, by default, is using UP TO 50% of the hosts RAM for its ARC for caching.
So everything fine and expected.
 
Last edited:
  • Like
Reactions: mauri_va
# Tuning zfs (limit zfs_arc to 1GB and disable prefetch)
echo -e "options zfs zfs_arc_min=1073741824" > /etc/modprobe.d/zfs.conf
echo -e "options zfs zfs_arc_max=1073741824" >> /etc/modprobe.d/zfs.conf
echo -e "options zfs l2arc_noprefetch=1" >> /etc/modprobe.d/zfs.conf

update-initramfs -u

reboot
 
  • Like
Reactions: mauri_va
I wouldn't reduce the ARC that much. You want a well sized ARC for good performance. With that hardware 4GB might be a good value and I wouldnt go below 2GB. Free RAM is wasted RAM, so better use it for ARC than not using it at all.
 
Last edited:
  • Like
Reactions: mauri_va
I wouldn't reduce the ARC the much. You want a well sized ARC for good performance. With that hardware 4GB might be a good value and I wouldnt go below 2GB. Free RAM is wasted RAM, so better use it for ARC than not using it at all.
this make sens on big share with small files, like samba share for user files, mail server etc.

backups its big files, prefetch and arc doesn't make sense - any files much biggest then ram
 
  • Like
Reactions: mauri_va
Its millions of ~2MB files and even more millions of 128K records with random IO. I wouldn't call that big files. You want it at least that big that it could cache all the metadata. Where rule of thumb is 0,4% of the capacity so with 4TB of raw storage you want to cache several GBs of metadata. If you can't fit all metadata in RAM a GC will be even slower.
 
Last edited:
  • Like
Reactions: mauri_va
Thank you all for your answers.
I didn't know about this use of RAM for the ARC cache (I confess to being a bit ignorant about using ZFS, I'm a first time user).
After reading your posts I am a bit confused, so I ask you to help me clarify my doubts.
I will rewrite my hardware configuration:

HP N54L microserver
CPU: AMD Turion(tm) II Neo N54L Dual-Core Processor
RAM: 16Gb ECC
Disk for OS: SSD 40Gb
4 x 1Tb HDD with ZFS RAIDZ
OS: Proxmox Backup Server ver. 3.1-2

This PC is used exclusively for the backup of:
- 2 Linux Containers (currently occupying about 4 Gb and 3 Gb)
- some data folders (currently totalling 31 Gb).
The data to be backed up will certainly increase in the coming weeks.
Backups are made with this frequency:
- folders/files: 1 time per day
- the LXCs: once a week
In addition to these tasks, PBS performs once a day:
- 1 Prune job
- 1 Garbage Collection
Finally, it performs 1 Verify job once a week.

Under these conditions, I ask if it is necessary to make changes to the zfs.conf file as suggested by basil or if I can leave everything as it is now.
My question in fact comes from the fact that I do not know that ZFS uses RAM as a cache, but if in my situation the use of RAM is correct and does not cause problems to the normal operation of the Server, I leave it as it is.
Thanks for your attention!
 
you can try - its not oneway or destructive settings, you can always revert to default configuration by

rm /etc/modprobe.d/zfs.conf
update-initramfs -u
reboot
 
  • Like
Reactions: mauri_va
(I confess to being a bit ignorant about using ZFS, I'm a first time user
Then don't forget to set a quota to prevent the pool from accidentally being filled to 100%.
With ZFS you usually want 20% of the capacity always free for best performance. I personallly always set monitoring to alert when it exceeds 80% and set a 90% quota.
 
  • Like
Reactions: mauri_va

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!