Commit graph

89 commits

Author SHA1 Message Date
Con Kolivas 22da2ee76d Push version number to 0.543.
Update docs.
2010-11-24 21:08:35 +11:00
Con Kolivas 6f2b94be3b Fix the case where a compressed file has more than one stream 0 entry per block.
Limit lzma windows to 300MB in the right place on 32 bit only.
Make the main process less nice than the backend threads since it tends to be the rate limiting step.
2010-11-24 20:12:19 +11:00
Con Kolivas 180f5340fe Bring version up to 0.542. 2010-11-20 18:34:45 +11:00
Con Kolivas f04b8aa15b Tweak defaults some more.
Set maximum size of compression window to chunk size in the case of -M mode and mmap size normally.
Set maximum window to 1.5x ram in -M mode.
2010-11-20 18:29:28 +11:00
Con Kolivas 6929492874 Fix the sliding mmap buffer not working on 2nd pass onwards which was causing a slowdon of death. 2010-11-20 09:44:54 +11:00
Con Kolivas 13ca377279 More tidying up and ensure control window is obeyed. 2010-11-20 09:22:47 +11:00
Con Kolivas 75e675e6dd Bump version number to 0.542.
Choose sane defaults for memory usage since linux ludicriously overcommits.
Use sliding mmap for any compression windows greater than 2/3 ram.
Consolidate and simplify testing of allocatable ram.
Minor tweaks to output.
Round up the size of the high buffer in sliding mmap to one page.
Squeeze a little more out of 32 bit compression windows.
2010-11-20 01:23:08 +11:00
Con Kolivas 25e053ed49 Wrong number of passes. 2010-11-18 23:44:22 +11:00
Con Kolivas fa757007d6 Refix the off-by-one that wasn't off-by-one. 2010-11-18 23:36:17 +11:00
Con Kolivas 591d791791 Bump version to 0.541.
Limit LZMA window to 300MB on 32 bit as per reports of failure when larger.
Minor documentation and display clean ups.
2010-11-18 23:33:43 +11:00
Con Kolivas 81ac86856b Update README. 2010-11-16 23:23:28 +11:00
Con Kolivas 0a4f6807e5 Increase version number to 0.540.
Fix compression type reporting on -i.
Remove some unnecessary output when -i is used.
Update docs and benchmarks.
2010-11-16 23:14:35 +11:00
Con Kolivas 2b08c6e280 Implement massive multithreading decompression.
This is done by taking each stream of data on read in into separate buffers for up to as many threads as CPUs.
As each thread's data becomes available, feed it into runzip once it is requests more of the stream.
Provided there are enough chunks in the originally compressed data, this provides a massive speedup potentially proportional to the number of CPUs. The slower the backend compression, the better the speed up (i.e. zpaq is the best sped up).
Fix the output of zpaq compress and decompress from trampling on itself and racing and consuming a lot of CPU time printing to the console.
When limiting cwindow to 6 on 32 bits, ensure that control.window is also set.
When testing for the maximum size of testmalloc, the multiple used was out by one, so increase it.
Minor output tweaks.
2010-11-16 21:25:32 +11:00
Con Kolivas b17ad2fa41 Minor warning fix. 2010-11-15 19:54:02 +11:00
Con Kolivas 3e77c702bb Fix typo and manpage format.
Fix warnings on newer gcc with attribute unused.
2010-11-15 11:35:37 +11:00
Con Kolivas 1637598c3f Bump version number up to 0.530.
Update all documentation.
Minor fixes by Jari Aalto for build and docs.
2010-11-13 21:37:17 +11:00
Con Kolivas 6e4fdc97f8 Implement -p option to specify number of processors to determine thread count.
Remove -P option as failing to set permissions only issues a warning now, removing any requirement for -P.
Change default compression level back to 7 as 9 was not giving significantly better compression but was slowing things down.
2010-11-13 17:36:21 +11:00
Con Kolivas e9957e1115 Fix zpaq compression now updating the console too much because it's now so much faster it uses up a lot of CPU time just ouputting to the screen.
Do this by updating only every 10%, and print separate updates for each thread.
2010-11-13 08:33:30 +11:00
Con Kolivas 02de002c58 Reworked the multithreading massively.
Place the data from each stream into a buffer that then is handed over to one thread which is allowed to begin doing the backend compression while the main rzip stream continues operating.
Fork up to as many threads as CPUs and feed data to them in a ring fashion, parallelising the workload as much as possible.
This causes a big speed up on the compression side on SMP machines.
Thread compression is limited to a minimum of 10MB compressed per thread to minimise the compromise to compression of smaller windows.
Alter the progress output to match some of the changes in verbose modes.
2010-11-13 01:26:09 +11:00
Con Kolivas 5505097b2f Implement multithreaded back end compression by splitting up the compression stream into multiple threads, dependant on the number of CPUs detected.
This facilitates a massive speed up on SMP machines proportional to the number of CPUs during the back end compression phase, but does so at some cost to the final size.
Limit the number of threads to ensure that each thread at least works on a window of STREAM_BUFSIZE.
Disable the lzma threading library as it does not contribute any more to the scalability of this new approach, yet compromises compression.
Increase the size of the windows passed to all the compression back end types now as they need more to split them up into multiple threads, and the number of blocks increases the compressed size slightly.
2010-11-10 20:56:17 +11:00
Con Kolivas b469e7b56c Distros don't like 3 point versioning scheme so change back to 2 point and change version to 0.520. 2010-11-08 10:43:05 +11:00
Con Kolivas 91228195a7 Bump version up to 0.5.2 for real. 2010-11-07 15:34:25 +11:00
Con Kolivas 2af314cf9d Bump version number to 0.5.2.
Update docs.
2010-11-07 15:33:07 +11:00
Con Kolivas ead0e54182 Drop the upper limit on lzma compression window on 64 bit. It is not necessary.
zpaq will fail with windows bigger than 600MB on 32 bit due to failing testing the 3* malloc test, so limit it to 600MB as well as lzma on 32 bit.
2010-11-07 01:57:23 +11:00
Con Kolivas b8528abee9 Consciously check page size, even though no one's going to build this on a machine with a different page size.
Clean up builds, removing ifdefs from main code.
Make output choices consistent.
2010-11-06 18:17:33 +11:00
Con Kolivas d053898b71 Left out a ; on the Darwin builds in main.c 2010-11-06 09:11:14 +11:00
Con Kolivas c27accc589 Forgot to update lrztar with -U option. 2010-11-06 01:08:17 +11:00
Con Kolivas 4cc625bcde Update changelogs. 2010-11-06 00:36:56 +11:00
Con Kolivas c9cfd30eb5 Not 100x slower any more. Update docs. 2010-11-06 00:10:57 +11:00
Con Kolivas 5ea38c0e44 Ensure file size is correct on compressed file from stdin.
Improve visual output.
Update manpage.
2010-11-06 00:00:44 +11:00
Con Kolivas 017ec9e85a Move the ram allocation phase into rzip_fd to be able to get a more accurate measure of percentage done.
Prevent failure when offset is not a multiple of page size.
Add chunk percentage complete to output.
Tweak output at various verbosities.
Update documentation to reflect improved performance of unlimited mode.
Update benchmark results.
More tidying.
2010-11-05 23:02:58 +11:00
Con Kolivas a66dafe66a Updated benchmark results.
More tidying up.
2010-11-05 14:52:14 +11:00
Con Kolivas 296534921a Unlimited mode is now usable in a meaningful timeframe!
Modify the sliding mmap window to have a 64k smaller buffer which matches the size of the search size, and change the larger lower buffer to make it slide with the main hash search progress. This makes for a MUCH faster unlimited mode, making it actually usable.
Limit windows to 2GB again on 32 bit, but do it when determining the largest size possible in rzip.c.
Implement a linux-kernel like unlikely() wrapper for inbuilt expect, and modify most fatal warnings to be unlikely, and a few places where it's also suitable.
Minor cleanups.
2010-11-05 12:16:43 +11:00
Con Kolivas 040b1d416c Update benchmark results 2010-11-05 07:34:25 +11:00
Con Kolivas f422e93232 Update benchmarks.
Minor tweaks to output.
2010-11-05 00:16:18 +11:00
Con Kolivas 29b166629a Huge rewrite of buffer reading in rzip.c. We use a wrapper instead of
accessing the buffer directly, thus allowing us to have window sizes larger than
available ram. This is implemented through the use of a "sliding mmap"
implementation. Sliding mmap uses two mmapped buffers, one large one as
previously, and one page sized smaller one. When an attempt is made to read
beyond the end of the large buffer, the small buffer is remapped to the file
area that's being accessed. While this implementation is 100x slower than direct
mmapping, it allows us to implement unlimited sized compression windows.
Implement the -U option with unlimited sized windows.
Rework the selection of compression windows. Instead of trying to guess how
much ram the machine might be able to access, we try to safely buffer as much
ram as we can, and then use that to determine the file buffer size. Do not
choose an arbitrary upper window limit unless -w is specified.
Rework the -M option to try to buffer the entire file, reducing the buffer
size until we succeed.
Align buffer sizes to page size.
Clean up lots of unneeded variables.
Fix lots of minor logic issues to do with window sizes accepted/passed to rzip
and the compression backends.
More error handling.
Change -L to affect rzip compression level directly as well as backend
compression level and use 9 by default now.
More cleanups of information output.
Use 3 point release numbering in case one minor version has many subversions.
Numerous minor cleanups and tidying.
Updated docs and manpages.
2010-11-04 21:14:55 +11:00
Con Kolivas c106128d1a Fix darwin build and clean up ifdef and incorrect ordered includes at the same time.
All builds were using fakememopen due to incorrect ifdef usage, so make GNU builds actually use memopen again.
2010-11-03 13:14:46 +11:00
Con Kolivas 9c00229ee1 Fix fd_hist check occurring too early on decompress.
fsync after flushing buffer.
Remove unnecessary memset after anonymous mmap.
Do test malloc before compression backend to see how big a chunk can be passed.
2010-11-02 13:50:15 +11:00
Con Kolivas c0ac813f6d Update docs.
Bump version number.
Tidy.
2010-11-02 11:14:00 +11:00
Con Kolivas 102140dc2b Reinstate the temporary files for decompression to stdout and testing as the damaged line reinstated last commit meant it looked like those combinations worked when they actually didn't.
Compression from stdin still works without temporary files.
2010-11-02 10:52:21 +11:00
Con Kolivas c464975b8d Oops, dropped some code! Fix it. 2010-11-02 00:18:17 +11:00
Con Kolivas 1e88273ffc Minor fixes. 2010-11-02 00:08:35 +11:00
Con Kolivas 772fbf602e Reinstitute 2GB window limit on 32 bit. It still doesn't work. However we can now decompress larger windows.
Do more mmap in place of malloc.
Update docs.
Remove redundant code.
2010-11-01 22:55:59 +11:00
Con Kolivas 0e09c9ec24 Reinstate the temporary file for decompression from stdin. Seeking makes that option broken without the temporary file.
Start documenting the new features in this version.
Minor tidying.
2010-11-01 21:37:55 +11:00
Con Kolivas ba1bf30d78 Minor tidying. 2010-11-01 19:59:27 +11:00
Con Kolivas 232b268367 Fix file size recording in the magic header when stdin is used. 2010-11-01 19:18:20 +11:00
Con Kolivas 43dd72b9e1 Do real stdin without the stupid temporary files by mmapping into anonymous ram. 2010-11-01 16:45:48 +11:00
Con Kolivas 49336a5e87 Update magic header info.
Move offset check to after reading chunk width.
Realloc instead of free and malloc.
2010-11-01 15:27:35 +11:00
Con Kolivas 1ed2ce423f Change the byte width to be variable depending on chunk size, and write it as a single char describing the next byte width for decompression.
More minor tidying.
2010-11-01 13:28:49 +11:00
Con Kolivas cb27097cb4 A few more cleanups to avoid using temporary files for stdout and testing on decompression. 2010-11-01 12:50:20 +11:00