• Hi, i have only one question, where can i change the compression level in fog ? ( I have ubuntu 11.10 + FOG 0,32 )

  • Tony Byrne,

    There is a forum resource that has all the pertinent information needed to changing your compression level already. I will post to that here.

    You will find, however, that the upload time will be dramatically increased with higher compression levels. However, the deploy times should actually decrease. This is because there is less data being sent to the system. So, while uploading images will take a long time, deploying should actually be faster.

    Ultimately, you state that you don’t care about the speed.

    What version of FOG are you using?

    In 0.33b (while it is only in beta mode it’s still pretty good) has options to adjust the compression level from the FOG Web GUI under FOG Configuration->FOG Settings->FOG_PIGZ_COMP.

    In 0.32 and below, you will have to edit the init.gz to change the compression level.

    -0 is the worst compression (most disk space used on server) while -9 is the best compression (less disk space used on the server).

    In 0.32 and below, it defaults to -3.

    To edit the compression level open a terminal on your fog server as root.

    Perform these commands:
    [code]cd /tftpboot/fog/images
    mkdir tmp
    gunzip init.gz
    mount -o loop init tmp
    sed -i ‘s:PIGZ_COMP="-3":PIGZ_COMP="-9":’ tmp/bin/fog
    umount tmp
    gzip -9 init
    rmdir tmp[/code]

    The sed -i line is where it’s changing your compression. It looks for the instance of PIGZ_COMP="-3" and changes it to PIGZ_COMP="-9" so if you want it less, make the edit to the second PIGZ_COMP phrase and make it less.

    Step by step of the commands are:
    change to the images directory
    make a directory within the images directory
    decompress the init.gz file.
    mount the extracted file to the tmp folder you just created.
    edit the relevant part of the proper file for compression.
    umount the tmp folder
    compress the init.gz file.
    remove the tmp folder.

    Hope this helps.

  • Can anyone answer this question I would also like to shrink the images as we have many models. Dont care about the time to create deploy. Is there a resource to say exactly how to have the compression on? When I run an image it says Compression level…None


  • Is drive space an issue for storing your images? Upping the compression on your images is really going to work your server more.

  • Here is an article on how to disable compression
    I think you can also increase the number to 2 and it will use bz2 compression to get it smaller, but will take longer to compress.

    At the end of the post they said there is a script that will do this for, you but I don’t know where it would be located. I will look around my fog-server and see if I can find it.