On image compression I found this super helpful post:

[SIZE=4][B][COLOR=#3b3b3b][FONT=League Gothic][SIZE=35px][URL=‘http://uberamd.com/post/22125061841/disable-gzip-image-compression-in-fog-for-faster-image’][COLOR=#0581d2]Disable GZIP Image Compression in FOG for Faster Image Creation[/COLOR][/URL][/SIZE][/FONT][/COLOR][/B][/SIZE]

[FONT=Helvetica Neue][COLOR=#333333]Recently I changed the software the imaging server at work uses from Clonezilla to FOG. There were many reasons for the change such as a better web interface, image deployment queue, etc however one of the main things I was looking forward to was storage nodes which allows for distribution of images across multiple servers to extend storage.

Deploying the FOG server was easy enough, however one of the first things I noticed was that image creation (uploading a new image to the server) was incredibly slow in comparison to image deployment. Image creation would take nearly 2 hours while image deployment would take about 25 minutes. This frustrated me to no end as we were doing this over gigabit and it wasn’t utilizing hardly any of the pipe on image creation. A quick glance at the screen told me why: FOG automatically assumes you want to GZIP the image. This means a smaller image, but a drastically increased image creation time since the system needs to compress the data it is sending.

I searched high and low through the config files for a way to disable GZIP compression, but found nothing. Eventually I figured out how to disable the compression, however doing so was not well documented at all. Enter this post which will hopefully help others solve the same problem I ran into.

Simply follow these steps (type these commands in your Linux terminal, you may need to be root or sudo to run some of these):

[FONT=Courier New]cp /tftpboot/fog/images/init.gz /tmp/init.gz
cd /tmp
gunzip init.gz
mkdir tmpMnt
mount -o loop /tmp/init /tmp/tmpMnt[/FONT]

Now using your favorite linux command line editor open the file /tmp/tmpMnt/bin/fog and find and replace all instances of -z1 with -z0. To do that with VIM do the following:

[FONT=Courier New]vim /tmp/tmpMnt/bin/fog

Once you have replaced all -z1 with -z0 we need to recompress and replace your old init.gz file:

[FONT=Courier New]cd /tmp
umount /tmp/tmpMnt
gzip -9 init
cp /tftpboot/fog/images/init.gz /tftpboot/fog/images/init.gz.old
cp -f init.gz /tftpboot/fog/images/init.gz[/FONT]

Thats it. Now you have disabled compression upon image creation and you should notice a VERY large drop in image creation time! FOG does provide a script that assists in editing the init.gz file, HOWEVER the script requires you to have Nautilus installed (aka GNOME) and how many people really run a GUI on a server? Not many.[/COLOR][/FONT]