Re: emulate an end-of-media
- From: Alex Zbyslaw <xfb52@xxxxxxxxxxxxxx>
- Date: Tue, 26 Feb 2008 09:32:16 +0000
Tim Kientzle wrote:
Why compress? It's ancient technology and will be vastly outperformed
Yes, gzip or bzip2 compress better, but they also:
* Are a lot slower.
* Use a lot more data memory.
* Require a lot more code.
I don't understand what "a lot more code" has to do with anything. gzip/zlib is part of base and portable.
In my quick tests on some real dump files, *if* you are able to specify the compression quality, then gzip -1 is both faster and better compressing than compress. If I'm reading time correctly, then gzip at any compression level used less memory than compress. bzip2 uses more memory but -9 always uses roughly the same amount of memory: ~9Mb.
180672 -r--r----- 1 root alex - 184893440 Feb 26 09:08 cartman-root.dump.0
131 {root @ ren} # time compress cartman-root.dump.0
7.948u 0.264s 0:08.93 91.8% 15+744k 0+725io 0pf+0w
92896 -r--r----- 1 root alex - 95051115 Feb 26 09:08 cartman-root.dump.0.Z
134 {root @ ren} # time gzip -1 cartman-root.dump.0
6.543u 0.288s 0:06.93 98.4% 56+585k 1+549io 2pf+0w
70368 -r--r----- 1 root alex - 71979780 Feb 26 09:08 cartman-root.dump.0.gz
137 {root @ ren} # time gzip -9 cartman-root.dump.0
44.588u 0.304s 0:46.53 96.4% 56+584k 0+494io 0pf+0w
63344 -r--r----- 1 root alex - 64800326 Feb 26 09:08 cartman-root.dump.0.gz
140 {root @ ren} # time bzip2 cartman-root.dump.0
51.327u 0.398s 0:53.44 96.7% 30+9638k 3+471io 3pf+0w
60384 -r--r----- 1 root alex - 61769750 Feb 26 09:08 cartman-root.dump.0.bz2
And for a largely text filesystem dump:
58352 -r--r----- 1 root alex - 59699200 Feb 26 09:13 cartman-var.dump.0
152 {root @ ren} # time compress cartman-var.dump.0
2.179u 0.102s 0:02.31 98.2% 15+737k 0+156io 1pf+0w
20000 -r--r----- 1 root alex - 20456769 Feb 26 09:13 cartman-var.dump.0.Z
155 {root @ ren} # time gzip -1 cartman-var.dump.0
1.441u 0.069s 0:01.53 98.0% 57+592k 0+116io 0pf+0w
14992 -r--r----- 1 root alex - 15328819 Feb 26 09:13 cartman-var.dump.0.gz
158 {root @ ren} # time gzip -9 cartman-var.dump.0
4.807u 0.062s 0:04.89 99.3% 56+583k 0+104io 0pf+0w
13424 -r--r----- 1 root alex - 13727598 Feb 26 09:13 cartman-var.dump.0.gz
161 {root @ ren} # time bzip2 cartman-var.dump.0
28.057u 0.132s 0:28.97 97.2% 30+9629k 0+91io 0pf+0w
11792 -r--r----- 1 root alex - 12052157 Feb 26 09:13 cartman-var.dump.0.bz2
--Alex
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- References:
- Re: emulate an end-of-media
- From: Martin Laabs
- Re: emulate an end-of-media
- From: Mike Meyer
- Re: emulate an end-of-media
- From: Alex Zbyslaw
- Re: emulate an end-of-media
- From: Julian H. Stacey
- Re: emulate an end-of-media
- From: Tim Kientzle
- Re: emulate an end-of-media
- Prev by Date: Re: Security Flaw in Popular Disk Encryption Technologies
- Next by Date: Re: Security Flaw in Popular Disk Encryption Technologies
- Previous by thread: Re: emulate an end-of-media
- Next by thread: Re: emulate an end-of-media
- Index(es):
Relevant Pages
- Re: Researchers seek to patent memory doubler algorithm
... "memory doubler" to increase his brain implant's storage capacity. ... Dubbed
Crames, for Compressed RAM for Embedded Systems, the memory ... "We were told that it was
impossible to compress data in RAM without ... unacceptable levels of latency,"
said electrical engineer Robert Dick, ... (comp.compression) - Re: FASTER PERFORMANCE
... Leaving the computer on 24/7 means that programmes with memory leaks do ...
Your system is bad fragmented and you need to increase your free disk to ... Empty your
Recycle Bin and Remove Temporary Internet Files. ... select Properties, General, Advanced
and check the box before Compress ... (microsoft.public.windowsxp.general) - Researchers seek to patent memory doubler algorithm
... "memory doubler" to increase his brain implant's storage capacity. ... Dubbed
Crames, for Compressed RAM for Embedded Systems, the memory ... "We were told that it was
impossible to compress data in RAM without ... unacceptable levels of latency,"
said electrical engineer Robert Dick, ... (comp.compression) - Re: dynamic module compression?
... The instructions need to be "uncompressed" for the CPU to process them. ...
The CPU would have to "compress AND decompress" for every pagefile ... Now IF you can't
afford cheap memory and insist on using a 4500 rpm hard ... > so memory sales and bigger
hard drives are always needed? ... (microsoft.public.win2000.general) - Re: Storage Memory dilemma
... the object store will compress files as you've seen. ... 15MB is allocated to
Program Memory and 5MB allocated to Storage ... Since i have 32MB of RAM
in total, i'm assuming the other 12MB got ... (microsoft.public.windowsce.platbuilder)