IBM i Global

IBM i Global

Connect, learn, share, and engage with IBM Power.

 View Only
Expand all | Collapse all

Please let me know if there is any way to reduce the processing time of ZLIB

  • 1.  Please let me know if there is any way to reduce the processing time of ZLIB

    Posted Tue August 13, 2024 09:26 PM

    Hello, Team

    We are currently running a ZLIB compression test on a Power10 machine.
    The compression rate of ZLIB is high and highly rated.
    However, the compression using the virtual tape device took 15 minutes for 2 TB, but it took 2 hours when compressing with ZLIB.
    Is there any way to reduce the compression time?Post



    ------------------------------
    Saori Koinuma
    ------------------------------


  • 2.  RE: Please let me know if there is any way to reduce the processing time of ZLIB

    Posted Wed August 14, 2024 02:23 AM

    Hello Saori, 

    https://www.ibm.com/support/pages/compression-zlib-algorithm-save-commands-and-apis

    • https://www.ibm.com/downloads/cas/QWXA9XKN

    7.23 What are some considerations for use of data compression in IBM i? 

    "The performance of any compression algorithm varies drastically based on the nature of the data that is being compressed."

    • https://www.linkedin.com/posts/diegokesselman_ibmi-ibm-as400-activity-7151413744621768704-kF4J/

    How much can you compress your data using ZLIB?
    *ZLIB is faster than *HIGH and during my tests I got an average compression ratio of 5:1, but it depends on the data you are saving.



    ------------------------------
    Fernando Plaza
    IBM i System Administrator
    CD INVEST
    MADRID
    ------------------------------



  • 3.  RE: Please let me know if there is any way to reduce the processing time of ZLIB

    Posted Thu August 15, 2024 12:36 AM

    Hello Fernando,

    Thanks for your comments and advice!

    What are the characteristics of data that enhance compression performance?
    I would like to know if there are any specific ways to increase the compression ratio. For example, eliminating data redundancy, etc.



    ------------------------------
    Saori Koinuma
    ------------------------------



  • 4.  RE: Please let me know if there is any way to reduce the processing time of ZLIB

    Posted Wed August 14, 2024 02:31 AM

    Dear Koinuma-san

    >>>> However, the compression using the virtual tape device took 15 minutes for 2 TB, but it took 2 hours when compressing with ZLIB. <<<<

    What DTACPR option did you use for compressing 2 TB in 15 minutes? 

    ZLIB's main benefit is in reducing saved data size AT THE EXPENSE of the time it takes to do the data save.   How do I know this?  Look at this very informative article by Mr. Simon Hutchinson: Testing the new save compression ZLIB  at https://www.rpgpgm.com/2023/11/testing-new-save-compression-zlib.html  (you can see this article when you Google with "ibm i zlib").

    Look at the comparison table at at the end of the article and you will see that ZLIB produces the SMALLEST saved data size but takes the SECOND LONGEST TIME to finish. It appears that ZLIB is a better choice ONLY WHEN compared to *HIGH as ZLIB is better in both dimensions. 

    If the time it takes for save operation is the most important factor to you, you should use *LOW (or *MEDIUM) for DTACPR parameter of the save commands.    

    Save
    algorithm
    Duration
    in minutes
    Duration
    in hours
    Save file
    size
    *ZLIB 236 3 3,474,513,100
    *HIGH 349 5 4,248,467,046
    *MEDIUM 145 2 51,622,494,208
    *LOW 35 0 106,559,512,576

    The lesson here is that you cannot have it both ways.  You can achieve one (compressed data size) at the expense of the other (time).

    For basic data save performance, you should also make sure that memory faulting rate is not too high during the data save period for the memory pool in which your data save job runs. Also "Ineligible" job state should not happen.  Check both of these with WRKSYSSTS screen or look at IBM i PDI chart for Memory and Faulting.  Also check that CPU % Busy is not high either. 



    ------------------------------
    Satid S
    ------------------------------



  • 5.  RE: Please let me know if there is any way to reduce the processing time of ZLIB

    Posted Thu August 15, 2024 12:42 AM

    Dear Satid san

    Thanks again for your comment.

    >What DTACPR option did you use for compressing 2 TB in 15 minutes? 

    I'll check with the customer.

    >The lesson here is that you cannot have it both ways.  You can achieve one (compressed data size) at the expense of the other (time).

    So one of the sacrifices must be made. I understand.

    You mean that you check for ineligible jobs. The customer commented that WRKSYSSTS checks were being performed and that there was not much CPU load.
    There was no mention of ineligible jobs, so I will check.



    ------------------------------
    Saori Koinuma
    ------------------------------



  • 6.  RE: Please let me know if there is any way to reduce the processing time of ZLIB

    Posted Mon August 19, 2024 05:00 PM

    I agree with Satid S on this, perhaps submit the SAVE JOB to BATCH (in a satisfactory memory pool), then look at that Job's stats with IBM i Navigator PDI, there you will have a good wealth of information if some memory was being pushed out when it shouldn't  and how long that job ran.

    (might I assume the save was done "interactively" for the time?) 



    ------------------------------
    Marius le Roux
    Owner
    MLR Consulting
    ------------------------------



  • 7.  RE: Please let me know if there is any way to reduce the processing time of ZLIB

    Posted Wed August 21, 2024 07:56 AM
    Edited by Hideyuki Yahagi Wed August 21, 2024 08:22 PM

    Is there any reason to stick with *ZLIB? As others have mentioned, different compression algorithms work best for different object types, which is why multiple compression options are offered.

    For reference, here is an example comparing the compression ratio and relative elapsed time (*NO = 1) by compression algorithm in the library QGPL and in a user library where the database files occupy most of the space. Clearly, *LOW is the way to go for the library QGPL. For the User Library, the choice would be *LOW, *MEDIUM, or *ZLIB, depending on whether backup time or compression ratio is more important. 

    I hope this helps.

    * Excerpted from "IBM i 7.5 and Power10 Overview" video on YouTube and translated into English.



    ------------------------------
    Hideyuki Yahagi
    ------------------------------



  • 8.  RE: Please let me know if there is any way to reduce the processing time of ZLIB

    Posted Fri August 23, 2024 09:12 AM

    One thing to point out with ZLIB.  It was added in 7.4 and yes, it does provide on average the best compression, but yea, it does come at a price. The pay off for using ZLIB is there, if you are on 7.5 AND Power10.  The Power10 processor, it has some onboard co-processor units that are specifically for ZLIB compression. So if you were to attempt the same compression test as Simon shown in the tables above with this updated environment, you would find the numbers very different. While Zlib is there. in 7.4 and 7.5 and works great, the real payoff, mixing the Power10 with the 7.5 release...



    ------------------------------
    Tim Rowe
    ------------------------------



  • 9.  RE: Please let me know if there is any way to reduce the processing time of ZLIB

    Posted Mon August 26, 2024 05:46 AM

    I want it on record that I wrote my post, mentioned above, as I was surprised to find ZLIB was possible in IBM i 7.4 running on an IBM Power 8.

    My results should not be taken as being the definitive answer as to whether you should use ZLIB or not as I have been unable to test it with IBM i 7.5 and IBM Power 10. I don't have access to a LPAR running IBM i 7.5 running on IBM Power 10. When I do I cannot wait to try it.



    ------------------------------
    Simon Hutchinson
    https://www.rpgpgm.com
    ------------------------------



  • 10.  RE: Please let me know if there is any way to reduce the processing time of ZLIB

    Posted Mon August 26, 2024 09:10 AM

    This thread makes me hope that our discussion so far would help inspire any members of this group with charitable souls who happen to run IBM i 7.5 on a Power10 machine would spare some times to conduct the test in the same way that Mr. Hutchinson did and share the result with us here as a generous and admirable charity for this community.   :-)   



    ------------------------------
    Satid S
    ------------------------------



  • 11.  RE: Please let me know if there is any way to reduce the processing time of ZLIB

    Posted Mon September 02, 2024 10:04 PM

    Thanks to everyone who commented!

    The discussion is lively and very informative.

    >What DTACPR option did you use for compressing 2 TB in 15 minutes? 

    The 15 minute results for 2TB were cases where the DTACPR was *DEV or *NO.

    Customers are not wedded to *ZLIB time compression.
    However, they are concerned about which components should be adjusted when using *ZLIB efficiently.
    I understand that this may involve the processor or memory, am I correct?



    ------------------------------
    Saori Koinuma
    ------------------------------



  • 12.  RE: Please let me know if there is any way to reduce the processing time of ZLIB

    Posted Mon September 02, 2024 10:07 PM

    According to Tim's comment, is the number of processors most involved?



    ------------------------------
    Saori Koinuma
    ------------------------------



  • 13.  RE: Please let me know if there is any way to reduce the processing time of ZLIB

    Posted Tue September 03, 2024 02:47 AM

    >>>> According to Tim's comment, is the number of processors most involved? <<<<

    Data save job WITHOUT data compression use little CPU power.  Even with data compression used, not too much more CPU power is needed still.  The word "numbers" that Mr. Tim used in his post refers to run time.      Unless you run very many concurrent data save jobs that do data compression for a reason, CPU power (and thus the number of processors) is normally not an issue. 



    ------------------------------
    Satid S
    ------------------------------



  • 14.  RE: Please let me know if there is any way to reduce the processing time of ZLIB

    Posted Tue September 03, 2024 02:40 AM
    Edited by Satid S Tue September 03, 2024 02:52 AM

    Dear Koinuma-san

    >>>> However, they are concerned about which components should be adjusted when using *ZLIB efficiently.  I understand that this may involve the processor or memory, am I correct? <<<<

    I do not see any special consideration for using ZLIB other than that running it in Power10 (and future Power processors) delivers the best run time (but still not as good as *LOW).   But from my long experience with data save performance in general, you need to be aware of the following:

    1) Disk response time that is good at high disk IO rate. (Good = less than 5 msec for HDD or 2 msec for SSD) This can be checked by looking at a PDI chart named Disk Throughput Overview for Disk Pools.  If you see your disk response time degrades too much during your data save period compared to other period, then your disk HW is not configured for consistent performance at high disk IO workload.  If the response time degrade is particularly bad (say, beyond 10 msec) and your customer is seriously in need of better data save time, it is worth upgrading the disk HW for good and  consistent response time at high disk IO workload.     I notice that this issue is no longer frequent in server using SSD/Flash Disk but it is better to always check with PDI chart. 

    2) Data save job has its main task running in *MACHINE memory pool (pool number 1 from WRKSYSSTS). If you see consistently high *MACHINE memory page faulting rate during the data save period (say, higher than 50 consistently - look at PDI chart named Memory Fault Rates), you should try to increase *MACHINE memory pool size.  My personal rule of thumb is that *MACHINE pool should be allocated the amount of memory of 2.5 times its "Reserved Size" that you see from WRKSYSSTS at high workload period

    You should also fix the size of *MACHINE pool using WRKSHRPOOL command.  ( https://www.itjungle.com/2008/12/03/fhg120308-story03/ )



    ------------------------------
    Satid S
    ------------------------------