Deployment Solution

 View Only

Double Your PXE Boot Speed! 

Jan 27, 2009 02:46 PM

You are probably aware that you can compress your WinPE image to decrease the download size and time for PXE booting WinPE. After you have done that, you can also optimize the file transfer speed to cut the time it takes to transfer the file in half, doubling your PXE boot speed!

Altiris PXE TFTP Server is responsible for making PXE boot files available to clients. You can improve the PXE boot transfer speed by replacing the Altiris PXE TFTP Server with a higher performance TFTP server.

You can substitute the Altiris PXE TFTP Server with almost any TFTP server. There are a handful of free open-source TFTP servers. One in particular, "TFTP Server" is written very efficiently and is multithreaded to optimize performance. In my tests, my PXE boot speed nearly doubled when I replaced the built-in TFTP server with this one.

You can learn more about TFTP Server (and even contribute to the open-source project if you want to) at their web site http://sourceforge.net/projects/tftp-server.

In order to take advantage of the increased performance of TFTP Server, you will need to Install TFTP Server for Windows. Next, you will configure TFTP Server to optimize it and make it compatible with Altiris PXE Server. After that, you will modify the Altiris PXE MTFTP Server service to load the new TFTP Server. Last, you will configure your PXE Server to disable MTFTP so that it is more compatible with TFTP Server.

Install TFTP Server for Windows

TFTP Server is very lightweight, and the install is fairly straightforward. You can install TFTP Server to any directory you want and it will have no problems working with Altiris PXE Server.

  1. Download and run OpenTFTPServerMTInstallerV1.62.exe on your PXE Server.
  2. On the first page, you can change the default path. Just remember to use that path later in this document whenever the path "C:\Program Files\TFTPServer" is referenced.
  3. Click Next.
  4. Click Install.
  5. Clear the box next to "Run program Install as Windows Service"
  6. Click Finish.

Configure TFTP Server for Windows

  1. Open Notepad.
  2. Open "C:\Program Files\TFTPServer\TFTPServerMT.ini"
  3. In the [LISTEN-ON] section, you can specify which IP Address(es) to use for servicing TFTP. You should specify the same IP Address that PXE is configured to use. If you do not specify any IP Address, the TFTP Server will listen on all Interfaces. If you are comfortable with specifying an IP Address to listen on, you can do so here, otherwise leave the section blank.
  4. In the [HOME] section (any line after "[HOME]" and before "[LOGGING]"), add a line containing the path to the Images folder in your PXE Server's install directory. For example: "C:\Program Files\Altiris\eXpress\Deployment Server\PXE\Images" (without quotes).
    • (Optional) To increase security, you can add IP Address ranges to the [ALLOWED-CLIENTS] section. This will deny all TFTP requests from any IP Address that is not in a range specified as an allowed client. If you leave this section empty, then all clients are allowed.
    • (Optional) If you have a firewall enabled between your clients and the PXE server, you can specify a port range for the server to use when it sends data to the clients. You can specify this under the [TFTP-OPTIONS] section with the line "port-range=30000-30100" (without quotes) where 30000 will be replaced with the lowest port to use (do not use ports less than 1024) and where 30100 will be replaced with the highest port to use. If this option is not specified, then any free port is used.
    • (Optional) TFTP Server will create a new thread for each client that connects to it and close the thread when the client is done. This allows it to run at optimal performance. To slightly speed up initial connections, you can reserve a certain number of threads to remain open even after the client has finished so that it can be ready to immediately assist another client. If more clients connect than we have open threads, new threads are opened on an as-needed basis and then closed when they are done. You can specify the number of threads to keep open under the [TFTP-OPTIONS] section with the line "ThreadPoolSize=16" where 16 will be replaced with the number of threads you want to remain open. If you do not specify a thread pool size, TFTP Server will default to keeping 1 thread open and then open more as needed.
  5. In the [TFTP-OPTIONS] add the line "blksize=1456". This specifies the packet size that the TFTP Server will use. The larger the packet size the faster your transfers will go. 1456 is the largest packet size the Ethernet supports.

    If you have problems with clients failing to download, decrease this value by 128 at a time until it works. Then, if you really want to fine-tune your performance, you can increase the value by 32 at a time until it fails again, then decrease the value by 8 at a time until it works again.

  6. Save the file.
  7. Close Notepad.

After you have installed TFTP Server once, you could copy the files TFTPServerMT.exe and TFTPServerMT.ini to other PXE Servers in your environment rather than installing running the installer on every machine. TFTPServerMT.exe and TFTPServerMT.ini are the only files needed for TFTP Server to run.

You can use the --silent switch to make the installer run silently to push it to multiple PXE Servers, but that may cause a reboot, so I would recommend you just copy the two files.

Modify the Altiris PXE MTFTP Server Service

Change the Altiris PXE MTFTP Server service to load TFTP Server. That way the Altiris PXE Config Helper service can stop and start the service when it updates the PXE boot files without knowing the difference.

  1. Click on the Start Menu and select Run...
  2. Type cmd.exe and press enter.
  3. In the command prompt window, type the following and press enter.
    		sc config "Altiris PXE MTFTP Server" binpath= "C:\Program Files\TFTPServer\TFTPServerMT.exe"
    
    
  4. Close the command prompt window.
  5. Now stop and restart the Altiris PXE MTFTP Server Service
    1. Click on the Start Menu and select Run...
    2. Type services.msc and press enter.
    3. Select the Altiris PXE MTFTP Server Service
    4. Click Restart.
    5. Close the services window

Disable TFTP Multicast

TFTP Server does not support Multicast. That is not really a problem since its performance far outweighs the use of Multicast, and since the actual 150 megabyte or greater boot.wim file is not transferred using multicast anyway. To improve the PXE Boot process speed while using TFTP Server, you will want to disable Multicast in the PXE Configuration Utility.

  1. Open the PXE Configuration Utility
  2. Go to the Multicast tab
  3. Disable the option to "Enable MTFTP"
  4. Click OK.

Final thoughts

Now that you have completed this process, you should notice a significant improvement in PXE boot speed. Please comment to this article and let me know the improvement you see.

Here is some more information you may need.

How to revert the TFTP Server

Once you have applied the faster TFTP Server, you probably will be very satisfied with it and will never want to go back. However, if you ever need to revert back to the Altiris PXE TFTP Server, simply do the following:

  1. Click on the Start Menu and select Run...
  2. Type cmd.exe and press enter.
  3. In the command prompt window, type the following and press enter.
    		sc config "Altiris PXE MTFTP Server" binpath= "C:\Program Files\Altiris\eXpress\Deployment Server\PXE\Pxemtftp.exe"
    
    
  4. Close the command prompt window.
  5. Now stop and restart the Altiris PXE MTFTP Server Service
    1. Click on the Start Menu and select Run...
    2. Type services.msc and press enter.
    3. Select the Altiris PXE MTFTP Server Service
    4. Click Restart.
    5. Close the services window

Additional Configuration Options

TFTP Server supports the specification of additional options in the TFTPServerMT.ini file. These options should be left default in most cases, but I will explain them here for the special circumstance where you will need to change them.

  1. The default logging level will be Errors only. If you want to change the logging level to None or All, specify that keyword in the [LOGGING] section.
  2. The default timeout setting is 3 seconds. You can specify a different timeout under the [TFTP-OPTIONS] section with the line "timeout=10" where 10 will be replaced with the number of seconds you want to wait before timing out. The maximum timeout you can specify is 255 and the minimum timeout you can specify is 1.
  3. By default, TFTP Clients can only read files; they can't write or overwrite files. I strongly recommend that you do not modify this setting. However, if you feel like you want to allow TFTP Clients to write files, I recommend that you at least specify a list of allowed clients under the [ALLOWED-CLIENTS] section to maintain some security. You can allow clients to write files in the [TFTP-OPTIONS] section by adding the line "write=Y" and "overwrite=Y".

Statistics
0 Favorited
1 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Mar 27, 2018 12:51 PM

Just to add my 2 cents here

I have 30 machines, intel I7, gigabit ethernet, 8GB ram 
all on the same vlan, desktops and ghost suite server all directly attached to the same switch. 
The boot.wim file for winPE4 is 168mb 

All things being equal, only changing the tftp process as per this doc;

time to mtftp to all 30 machines with the default process that installs with ghost suite, with or without multicast TFTP enabled
24 mins 33 seconds

time to tftp with openftp multithreaded to all 30 machines
55 seconds

That is not a typo, 55 seconds. 

your mileage may vary but that is what I got. Hope this helps, Condorman is a steely eyed missle man (person! :)

Alan

 

Sep 21, 2017 10:54 AM

We implemented this on our production service because PXE would fail when trying to boot more than 1 client. As well as fixing the multiple client booting issue, tftp load time for winpe 32-bit is down to 1min15 from 2mins15 - so nearly twice as quick.

 

So CONDORMAN if you are ever in Oxford drop me a line and I will buy you a beer! Thanks :)

Jul 07, 2011 03:18 PM

Does this TFTP server only work with WinPE, or will it also work with FreeDOS or MS DOS? If so, where do you point the Home directory? This is the error I get when I point it to the images directory, or anywhere else for that matter:

Malformed Request, Invalid/Missing Filename

I've tried 8.3 and long file names.

Dec 29, 2010 05:51 AM

Thanks for this article and the others Mr Condorman.

I put the last version and it's work perfectly ! And it's fast ;)

I will deploy on all my PXE Servers

Mar 25, 2010 11:49 AM

There is a new version (1.62) of the TFTP Server available here.
You can always see the latest version here.

Jun 15, 2009 02:35 AM

I am extremely happy with this modification.At the time of my attempt, the server version is now 1.61 instead of 1.60 (not sure if that makes any difference). The PXE boot time was incredible. I created a test deployment of thirty (30) computers and instead of the long, slow, PE boot time I was used to, I was in automation and running tasks on all 30 computers inside of three minutes. Thats 500% faster (at least) for this lab.

I had tried the "Use MTFTP" options both ways in the PXE Config, and also tuned the ethernet block size... but the PxeMtftp.exe at it's best was nowhere near this one. Thank you very much for this article... Very happy!

And for those that are having "File Not Found" errors, enable logging in the TFTP-serverMT.INI file and verify the path of the boot image. I followed the instructions exactly and found I had a different path... oops. Also try 8.3 filenames if there are spaces in the path.

Jun 09, 2009 05:25 PM

It's true that PXE doesn't support multicast, but I don't agree with the statement that DOS is the only viable pxe preboot.  The Linux preboot can be quite fast.  DOS is usually around 5 megs, Linux around 18 Megs, and WinPE around 150 Megs.  So I'd still say that Linux is very suitable for pxe, even under load.

If you're real bottleneck is the PXE server, there are some other options:

1) Use the "batch" feature when assigning the job.  If have DS schedule 10 computers every 10 minutes, most machines enough time to get into their preboot before the next ones boot.

2) Add additional PXE servers.  DS supports having dozens of PXE servers all utilizing the same DS to help share the load.

3) Make sure you're running Gigabit with no bottlenecks.


There are several other tricks, but those are some of the simplest.


Jun 09, 2009 06:16 AM

PXE is really only viable in lab environments when you are using DOS. If you want to use Linux or WinPE, try embedded or hidden bootworks. These will give you lightning fast automation boot times.

TFTP is the only option for PXE, as this is the protocol which forms part of the PXE standard. Various extentions have been proposed to move TFTP to being able to send and acknowledge trains of packets, but this hasn't made it into the PXE standard.

Until PXE moves on to reflect real-world usage today, then I'm afraid we are pretty much stuck with these appaling speeds. So, my advice is to leave PXE booting for initial deployment type scenarios (where imaging is rarely required) and use bootworks everywhere else where imaging is regularly required.

Kind Regards,
Ian./

Jun 09, 2009 01:25 AM

Thanks eorme,

I've done that and made the TFTP transfers quite fast when imaging one PC, but when doing to a lab of say 30 pc's because the TFTP is hardcorded to only have one packet on the wire at a time, it really makes things slow!

Really seems to be going backwards when things like this happen, why couldn't multicast be added or maybe use a dos transfer intead of TFTP?

Josh

May 18, 2009 02:42 PM

Before going to all the work replacing the TFTP server, I'd try adjusting the packet size first.  The following article explains this in detail.
https://www-secure.symantec.com/connect/articles/chapter-6-winpe-pxe-automation-option

Just go down to the section "Make your TFTP connections faster".

Also if you aren't a DOS preboot user, try disabling MTFTP since it is not supported on Linux or WinPE preboots.

Apr 27, 2009 07:35 PM

When exactly in the boot sequence is it saying "File Not Found". We will need to know this information before we can help you, for there are more than a few files loaded during PXE Boot.

Josh

Apr 27, 2009 03:07 PM

I followed the directions exactly but when it tries to boot to the PXE server It is coming up with a "File Not Found" then it says restarting and will restart the machine I am trying to image. If I switch the binpath back to the Altiris server It works fine. What am I doing wrong?

Mar 17, 2009 08:29 PM

I'm going to agree with Nelo on this one, I've tried this in a 30 PC lab environment. Let's just say it's not worth even thinking about. I've even tried making an iso based wim file of WinPE and download it to the pc using DS and then running the iso file via automation. However that failed too.

But you gave me an idea that may prove useful if it works. You can change the TFTP server, so is it possible to change the server type completely? Could you change it to a different file distribution server? So that it does support multicasting and also doesn't just use one packet on the wire at a time?This will not improve speed for one PC but will surely improve the speed for a Lab of PC's.

Josh

Jan 30, 2009 05:19 AM

Hi Condorman,
I didn't even know you could use a different vendor's TFTP setup. Well done for posting this work!
I was wondering if you could confirm something for me though. When I did some download calculations with the Altiris TFTP server it was delivering close to the theoretical limit for TFTP. The issue being that the TFTP protocol can only have one packet on the wire at a time.
I notice that your article maxes out the TFTP blocksize. Are you comparing the TFTP performance with the Altiris TFTP service configured with a maxed out block size too?
If this is indeed a like-for-like comparison, then this is very interesting, and time for some wireshark play ;-)
Kind Regards,
Ian./

Jan 28, 2009 06:06 PM

I have tried this exact setup back in the DS 6.5 release and when PXE booting one or two clients, WinPE, the download speed is awesome. The same test with 5 or more machine proves the downloads to be slower than the Symantec PXE server. SO in resume, while it is true u get faster downloads with a couple of clients, this could be a problem when PXE booting more than 3 clients.
Nelo

Jan 28, 2009 11:21 AM

will have to try this in my lab envirmoment. thanks for this

Related Entries and Links

No Related Resource entered.