-
⚠️ Disclaimer
- Dedicated disk: Always use a separate, empty disk for NFS storage. Avoid using the same disk as the operating system to prevent I/O bottlenecks and ensure better performance.
- No mixing workloads: Do not mount NFS on the OS disk. Mixing OS and NFS workloads will slow down the entire system.
- File descriptor limits: NFS and applications like UNA may open thousands of files simultaneously. Increase
nofile
limits to avoid errors such as “Too many open files”. - Private network: Use a private network (VLAN, VPN, or dedicated interface) for NFS traffic. This prevents slowdowns for your users and improves security.
- Scalability: NFS is fine as a temporary or simple solution. For long-term growth and high performance, migrate to OpenStack Cinder or another distributed storage backend.
- If you choose the simple NFS solution, read the recommendations carefully.
- I do not know what operating system or exact server configuration you are using, so I cannot provide a one-size-fits-all recipe. The commands shown are only examples and must be adapted to your environment.
- The NFS server should be a freshly installed system, dedicated exclusively to NFS, with a separate disk (not the OS disk), and no other services running.
- If you only have one disk on the vps, you must first create a separate partition before configuring it for NFS.
On a VPS, the open files limit (
nofile
) can be set by the provider, and in many cases, it cannot be fully modified by a normal user or even by root.Some details:
- VPS-imposed limits:
- Some VPSs (especially shared or container-based ones, like OpenVZ) have strict limits on open files.
- These limits are set in the kernel or via cgroups and cannot be bypassed without provider intervention.
- Check current limits:
ulimit -n cat /proc/$(pidof )/limits
- Attempting to modify:
- You can try changing
/etc/security/limits.conf
or/etc/systemd/system.conf
//etc/systemd/user.conf
, but on a VPS these changes may be ignored if the provider enforces restrictions. - Example
/etc/security/limits.conf
:
* hard nofile 65535 * soft nofile 65535
- What you can do:
- Check with your provider if the VPS supports increasing the open files limit.
- If not, for applications requiring many simultaneous open files (like NFS + UNA), it’s safer to use a dedicated server or a VPS with full control (KVM, Proxmox, etc.), where you can set limits as needed.
If you use a VPS and the
nofile
limit is too low, you won’t be able to run NFS + UNA at full capacity without restrictions. A dedicated server or fully controllable VPS is recommended.For optimal performance and reliability, a dedicated server with two disks in RAID for the operating system and two separate disks in RAID for NFS storage is recommended. You need to be aware that on a VPS even KVM-based, you have limited control and can’t do too much. Also, make sure to read your provider’s terms and conditions: modifying limits could be considered a violation of their usage policies, and your contract could be terminated. Therefore, always request permission from your provider first.
DOCS: