CodexBloom - Programming Q&A Platform

Slow file copy performance over NFS from Ubuntu 22.04 to CentOS 8

๐Ÿ‘€ Views: 0 ๐Ÿ’ฌ Answers: 1 ๐Ÿ“… Created: 2025-06-29
nfs linux performance bash

I'm experimenting with I need help solving I'm working on a project and hit a roadblock... I've been experiencing significantly slow file copy speeds when transferring files from my Ubuntu 22.04 machine to a CentOS 8 server over NFS. The average speed hovers around 1 MB/s, which is unexpectedly low given that both machines are connected via a gigabit network. I checked the network interface and everything seems fine. Hereโ€™s the NFS export configuration on the CentOS server in `/etc/exports`: ```bash /home/user/nfs *(rw,sync,no_root_squash) ``` On the Ubuntu client, I'm mounting the NFS share like this: ```bash sudo mount -o rw,hard,intr,nfsvers=4 server_ip:/home/user/nfs /mnt/nfs ``` Iโ€™ve also tried adjusting the mount options to include `rsize` and `wsize` parameters, like this: ```bash sudo mount -o rw,hard,intr,nfsvers=4,rsize=8192,wsize=8192 server_ip:/home/user/nfs /mnt/nfs ``` But the performance hasnโ€™t improved. I ran a simple test copying a 1 GB file using the `cp` command: ```bash cp largefile.iso /mnt/nfs/ ``` And it took over 15 minutes to complete. I also checked the logs (`/var/log/messages`) on the CentOS server but didn't find any relevant behavior messages. I suspect there might be some tuning needed either on the NFS server or the client, but Iโ€™m not sure where to start. Any suggestions on how to diagnose and improve the NFS file transfer speeds? My development environment is macOS. Any help would be greatly appreciated! The project is a web app built with Bash. Any ideas what could be causing this? Is this even possible?