Giter VIP home page Giter VIP logo

Comments (5)

pete4abw avatar pete4abw commented on June 12, 2024

Discussion when LZMA or ZPAQ used:

Ramsize = total system ram
Usable ram = Ram size / 3 or 6 depending on whether or not STDIN/OUT is used
Stream out Limit = Usable ram / 2 (when compression is used)
Overhead = ram used by LZMA or ZPAQ (only applicable when LZMA or ZPAQ used)
Threads * Overhead has to be less than Limit

Instead of reducing Limit, we reduce threads and then overhead size.

Stream bufffer size should be Threads * Overhead, not Limit / Threads.

The goal is to have the largest possible buffer passed to backend.

from lrzip-next.

pete4abw avatar pete4abw commented on June 12, 2024

When lzma levels are low, the dictionary size is really low, so that passing such a small buffer is impractical. For example, at Level 1, the lzma dictSize is only 256KB. At Level 3, just 4MB. So, control->overhead just won't do it. Now, a focus will change to

MAX(limit/threads, control->overhead)

Work continues...

The same may be true with ZPAQ.

from lrzip-next.

pete4abw avatar pete4abw commented on June 12, 2024

The new stream_buffsize_fix branch is live. A test suite was run on a 22GB Android source file with lrzip and lrzip-next for all compression levels. The two takeaways were

  1. lrzip-next compressed better
  2. lrzip-next was slower

The following table explains.

Source file size: 22,186,711,040
Host machine 16GB ram, NVMe drives

Level L-Version Comp Size Comp Ratio Time Comp Dictionary Size Stream Buf Size
1 lrzip 8,631,012,019 2.571 07:28 65,536 303,083,217
1 lrzip-next 8,398,936,430 2.642 07:55 262,144 306,614,272
2 lrzip 8,404,895,681 2.640 08:35 65,536 303,083,217
2 lrzip-next 8,030,466,426 2.763 09:46 1,048,576 306,614,272
3 lrzip 7,981,495,752 2.780 09:43 262,144 301,952,721
3 lrzip-next 7,388,579,291 3.003 10:55 4,194,304 306,614,272
4 lrzip 7,566,017,145 2.932 11:29 1,048,576 297,430,737
4 lrzip-next 7,062,290,035 3.142 10:55 8,388,608 306,614,272
5 lrzip 7,350,404,281 3.018 11:29 1,048,576 297,430,737
5 lrzip-next 6,551,861,089 3.386 16:33 16,777,216 306,614,272
6 lrzip 7,105,457,377 3.122 12:29 4,194,304 279,342,801
6 lrzip-next 6,375,766,737 3.480 17:25 33,554,432 358,629,376
7 lrzip 6,406,880,370 3.463 21:09 16,777,216 206,991,057
7 lrzip-next 6,260,303,409 3.544 21:54 33,554,432 358,629,376
8 lrzip 6,343,430,552 3.498 22:37 33,554,432 110,522,065
8 lrzip-next 6,151,916,421 3.606 25:39 67,108,864 710,950,912
9 lrzip 6,711,450,403 3.306 23:53 67,108,864 10,485,760
9 lrzip-next 6,109,073,029 3.632 29.21 100,663,296 1,063,272,448

from lrzip-next.

pete4abw avatar pete4abw commented on June 12, 2024

Next step to optimize is this. If we know the size of the file being compressed, and it is less than the chunk limit we could possibly make a better computation for overhead size comparison and threads used.

from lrzip-next.

pete4abw avatar pete4abw commented on June 12, 2024

All done. Merged into lzma-sdk-21.04beta.

from lrzip-next.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.