Ran into an edge-case with a PBS virtual machine that had the chunks stored the host, backed by virtiofs. Garbage collection would consistently fail with "ENFILE: File table overflow"
Finding the limit wasn't the easiest since it isn't enforced using the process limits, rather "virtiofsd" has its own internal limit, set by a command line switch, that Proxmox itself doesn't allow editing
My solution was to create a wrapper that replaces virtiofsd with a command line that increases the limit that is sufficient for my use case.
It's probably the best to create a dpkg diversion so the file is preserved when apt upgrades the virtiofs package
Then, make a shell script that contains the rlimit switch, replacing /usr/libexec/virtiofsd
Cheers!
Finding the limit wasn't the easiest since it isn't enforced using the process limits, rather "virtiofsd" has its own internal limit, set by a command line switch, that Proxmox itself doesn't allow editing
My solution was to create a wrapper that replaces virtiofsd with a command line that increases the limit that is sufficient for my use case.
It's probably the best to create a dpkg diversion so the file is preserved when apt upgrades the virtiofs package
Code:
dpkg-divert --add --rename --divert /usr/libexec/virtiofsd.real /usr/libexec/virtiofsd
Then, make a shell script that contains the rlimit switch, replacing /usr/libexec/virtiofsd
Bash:
#!/bin/sh
exec /usr/libexec/virtiofsd.real --rlimit-nofile=10000000 "$@"
Cheers!