How do you re-compress an image file?



  • Does Fog re-compress the image file when you update the image via the web GUI? Or do you need to recapture?



  • You need to recapture. Preferably to a new image so that if something goes wrong, you still have the old one.


  • Developer

    @Tom-Elliott in fact, in my testing, it was 10% faster


  • Senior Developer

    @george1421 To be fair, Zstd at 11 doesn’t seem to be any slower, to me, than gzip at 6.



  • @george1421 Thanks! We’ll give it a try.


  • Moderator

    @Pistachio said in How do you re-compress an image file?:

    We’ve captured an image with “6” level of compression and we want to compress it further using “18”. Do we need to recapture or just update the compression level via the web GUI?

    If you want to take advantage of the higher compression index (i.e. to get a reduce disk space footprint on your FOG server), you need to recapture your image. I would also suggest that you switch over to the zstd compressor with an index of 11 to start. The zstd compressor (in opposition to gzip), is slower on the compression side, but much faster on the decompression side than gzip. Consider that you typically compress the image one and decompress it many times. Personally I can live with a slower image capture once than many image deployments. I can tell you in my environment I can deploy a 25GB image in about 4 minutes.



  • @george1421 Thanks! I understand now.



  • @Tom-Elliott We’ve captured an image with “6” level of compression and we want to compress it further using “18”. Do we need to recapture or just update the compression level via the web GUI?


  • Moderator

    @Pistachio I’m not sure I totally understand your question, but let me tell you how fog works.

    There are two elements to a fog image. The first is the meta data that is stored in the database. This describes the image. The second is the raw image files stored in /images/<image_name> directory. If you update the meta data then only the database record is changed. If you recapture an image then the raw data files are updated.

    Now you have to be careful if you change certain meta data that describes the information contained in the raw image. For example if you captured an image using gzip partclone and then change it to something else or change the format from single disk non-resizable to single disk resizable you will have issues. Because the actual image files will not match what the meta data is telling it to do during deployment.

    There are some meta data that if changed will not have an impact on an already captured image like compression index. That value is only used when the image is captured. On deployment the fog image decompressor just decompresses what has already be compressed it doesn’t care about the compression ratio.


  • Senior Developer

    I don’t understand the question. Fog compresses it whenever you capture it. Did you manually decompress it?


Log in to reply
 

429
Online

5.8k
Users

13.1k
Topics

123.1k
Posts