LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-09-2016, 03:55 PM   #1
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,144

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
nfs root extremely slow... ubuntu 16.04 server


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.
 
Old 08-10-2016, 05:43 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
I think it will depend on the NFS server...

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.

Last edited by jpollard; 08-10-2016 at 05:48 AM.
 
Old 08-10-2016, 08:06 AM   #3
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,144

Original Poster
Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
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.
 
Old 08-10-2016, 08:26 AM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
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).
 
Old 08-10-2016, 08:34 AM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,672
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
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.
 
Old 08-10-2016, 09:59 AM   #6
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,144

Original Poster
Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
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.
 
Old 08-10-2016, 04:11 PM   #7
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,144

Original Poster
Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
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.
 
Old 08-10-2016, 07:50 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
That will do it
 
Old 08-10-2016, 08:00 PM   #9
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Ah... Never thought about it doing a network install. That would be slow.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extremely slow browsing NFS shares since latest slackpkg update enine Slackware 1 05-10-2015 03:57 AM
Samba and NFS transfers are extremely slow, please help! win_the_day_go_ducks Linux - Networking 2 09-22-2014 11:50 PM
Ubuntu installer extremely slow... bastawhiz Ubuntu 7 06-18-2006 11:04 AM
Extremely slow mount times for NFS wayloud Linux - Networking 2 06-04-2005 12:58 AM
What would make an NFS mount EXTREMELY slow ? lostboy Linux - General 3 06-17-2004 09:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration