iPXE discussion forum
Slow Boot Times - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Slow Boot Times (/showthread.php?tid=8816)



Slow Boot Times - altsysrq - 2017-03-24 22:19

When booting using tftp or http it seems to be slow to load our vmlinuz file. It takes over 30 minutes for a 5.9M file. I am working with a test environment using the following configuration:

dhcpd.conf
Code:
option domain-name-servers 8.8.8.8, 8.8.4.4;
default-lease-time 7200;
max-lease-time 604800;
authoritative;
option domain-name "fenetwork.domain.com";
option space PXE;
option PXE.mtftp-ip    code 1 = ip-address;
option PXE.mtftp-cport code 2 = unsigned integer 16;
option PXE.mtftp-sport code 3 = unsigned integer 16;
option PXE.mtftp-tmout code 4 = unsigned integer 8;
option PXE.mtftp-delay code 5 = unsigned integer 8;
option arch code 93 = unsigned integer 16; # RFC4578
use-host-decl-names on;
ignore client-updates;
ddns-update-style none;

subnet 192.168.50.0 netmask 255.255.255.0 {
    range 192.168.50.30 192.168.50.254;
    class "UEFI-32-1" {
    match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00006";
    filename "efi64/ipxe.efi";
    }

    class "UEFI-32-2" {
    match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00002";
     filename "efi64/ipxe.efi";
    }

    class "UEFI-64-1" {
    match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007";
     filename "efi64/ipxe.efi";
    }

    class "UEFI-64-2" {
    match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00008";
    filename "efi64/ipxe.efi";
    }

    class "UEFI-64-3" {
    match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00009";
     filename "efi64/ipxe.efi";
    }

    class "Legacy" {
    match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000";
    filename "bios/undionly.kpxe";
    }

    option root-path "/srv/fsroot";
    next-server 192.168.50.10;
    option subnet-mask 255.255.255.0;
    option broadcast-address 192.168.50.255;
    option routers 192.168.50.10;
    ddns-update-style none;
}

script.ipxe
Note that http:// was also tried.
Code:
#!ipxe

# Give user a chance to enter the shell
prompt --key 0x02 --timeout 2000 Press Ctrl-B for the iPXE shell... || goto no_shell
shell
exit

:no_shell
kernel tftp://feclient/vmlinuz nfsroot=192.168.50.10:/srv/fsroot/feclient/,nolock root=/dev/nfs noswap initrd=initramfs ip=dhcp aufs=tmpfs quiet nomodeset iomem=relaxed e1000e.WriteProtectNVM=0 ehci_hcd.ignore_OC=1 BOOTIF=01-${net0/mac} MBXSerial=none
initrd --name initramfs tftp://feclient/initrd.img
boot

compile-it.sh
Code:
#!/bin/bash
make bin-x86_64-efi/ipxe.efi EMBED=script.ipxe
make bin/undionly.kpxe EMBED=script.ipxe

########### Extra stuff ##########
cp bin-x86_64-efi/ipxe.efi /srv/fsroot/efi64/
cp bin/undionly.kpxe /srv/fsroot/bios/
/etc/init.d/isc-dhcp-server restart
/etc/init.d/tftpd-hpa restart

The config/general.h has had no changes from the cloned repository.

Any thoughts or assistance is appreciated.


RE: Slow Boot Times - NiKiZe - 2017-03-25 00:00

When exactly is it slow? (you have both undionly.kpxe and ipxe.efi which one is used)

is this on one or multiple machines and what kind of machine(s) ?

what does ifstat show

also what does imgstat show if that is put before your boot line.
The example script is tftp - let's use http instead for all tests.


RE: Slow Boot Times - altsysrq - 2017-03-27 14:50

Thank you for your assistance.

With tftp:
Code:
root@fepxe0:/home/feadmin# ifstat
     enp0s25               eno1
KB/s in  KB/s out   KB/s in  KB/s out
    0.00      0.00      0.20      0.18
    0.00      0.00      6.55      0.14
    0.00      0.00      0.13      0.14
    0.00      0.00      0.14      0.14
    0.00      0.00      0.32      0.14
    0.00      0.00      0.07      0.14
    0.00      0.00      0.33      0.14

With http:
Code:
root@fepxe0:~/ipxe/src# ifstat
     enp0s25               eno1
KB/s in  KB/s out   KB/s in  KB/s out
    0.00      0.00      0.39      0.18
    0.00      0.00      0.57      0.14
    0.00      0.00      2.11      0.14
    0.00      0.00      0.39      0.14
    0.00      0.06      0.40      0.14
    0.00      0.06      0.53      0.14

Connection eventually times out when using http. I am looking on where to increase the keepalive value, but I doubt that is the cause of my problem after looking at the suggested ifstat results.

I receive the same results if I put imgstat in place before the boot command. I am guessing the reason for this is because the slowness is occuring while loading the kernel. I am investigating still, but appreciate more suggestions.


RE: Slow Boot Times - NiKiZe - 2017-03-27 15:06

ifstat in ipxe from cmd line : http://ipxe.org/cmd/ifstat

output from imgstat in ipxe so we can see the size of files

do you get normal speeds when OS is booted on the machine?

And again, is this one or multiple machines?


RE: Slow Boot Times - altsysrq - 2017-03-27 16:01

NiKiZe,
Thank you for your time. This was a misconfiguration that I have forgotten from previous installations. When I compiled ping in I was able to determine that pinging the server did not work. Using 'dhcp' was able to bring up an IP and then I was able to ping the server. I remembered that needed to be in the script.ipxe file. When I put that in, everything worked.

I am sorry. This was not a speed issue at all. It just never loaded. I should have specified this to you. TFTP will by design wait forever. Http will time out. These are also details/symptoms I could have pointed out that may have been beneficial for you. I was in a rush to troubleshoot and get as much information as I could down. Just not the right information. For that I apologize.


RE: Slow Boot Times - NiKiZe - 2017-03-27 19:12

Thanks for the info, and happy you found the issue, as I understand you where missing dhcp in script or manually?