[SOLVED] nfs root extremely slow... ubuntu 16.04 server
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
With my experimentation with linux some days i create 5+ vms. As such it seemed logical to make a pxe boot server for myself. After much struggling it works great, except it is extremely slow. The TFTP files transfer over quickly but once it gets to actually reading the nfs "disk" the transfer speed is horrid.
In a test vm it took me almost 10 minutes to get through the first "retrieving" part of the ubuntu server installer. In theory it should be faster than a usb 2.0 flash drive, but not even close.
No idea where to start to diagnose and fix this. Appreciate suggestions and help to solve.
*EDIT* Tested on bare metal, same result on my laptop.
iperf test.
Code:
[ 3] 0.0-10.0 sec 1.09 GBytes 936 Mbits/sec
Last edited by jmgibson1981; 08-09-2016 at 04:00 PM.
How many NFS server processes are available? The default is 8, but I have actually seen 4 as a default - for 5 VMs I would suggest 12.
How many CPUs on the NFS server (if less than 8 it might slow down a good bit), and the VM host (at least 1 for the host itself, preferably 2)?
Is locking used/supported?
What about the routing of the VM network to the NFSserver?
Are all 5 VMs active/booting simultaneously?
And since you are testing, is the NFS server also the host for the VMs?
If all 5 VMs are booting simultaneously then a 1GBit interface would be divided by 5 (6 to account for some additional overhead) which would come out at about 170MBit to 200Mbit throughput (or very roughly 20-25 MByte/sec I/O each - which would be VERY slow)
There is also the issue of what else may be active on the network.
Nfs threads at 8. Vm host is laptop, quad-core core i7. One vm at a time, still testing it. Nothing else to speak of on network, nothing high bandwidth intensity that is. The vm host is connected to server via gigabit switch. I have same problem on kvm vm on the server hosting the pxe server and nfs shares as well.
I do know that when I was mounting my iso nfs shares and installing from that on laptop virtualbox it was good and fast. Is something specific to the pxeserver.
Sloppy reply, lq.org not good on my phone
Last edited by jmgibson1981; 08-10-2016 at 08:10 AM.
1Gbit/sec would translate to about 128MByte/sec transfer.
It shouldn't be the PXE server as once the kernel+initrd is loaded, the PXE server is out of it. If the other response on the laptop is normal, then it might be the virtual network connection to the VM.
Usually there is two levels of routing going on at that point - the VM virtual network to the host to the remote server. I don't offhand know the overhead that imposes as my VMs use local disk emulation just to see if things run. It is possible the VM doesn't have enough memory and is having to page over NFS (which is really really slow). I have 8 GB of memory and usually give between 1 and 2 GB to a VM for operation. I have tested less than 1GB, and it gets rather slow (sometimes can't even install).
I think that the only plausible explanation for this sort of "motionlessness" is some kind of timeout. Check the network logs carefully and be sure that you see a commensurate amount of network traffic taking place.
I'll look at the logs when I get home. I eliminated the vm question by test loading and installing on spare partition on my laptop bare metal. Took very long time.
Last edited by jmgibson1981; 08-10-2016 at 10:03 AM.
Marking as solved. I looked over several guides and I found a few that were using a Kickstart file that directed the installer to get it's files from the nfs share instead of the internet. That is why it was so slow, my internet is mediocre at best and it was downloading everything instead of actually using the nfs share. adding a kickstart directing it to use the nfs share solved the issue.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.