Hi,

We've been carrying a patch to enable gzip big memory options, as it
makes a significant difference to the speed and ESXi is not memory
constrained (well, compared to some tiny embedded system :)

Enabling the config option on my standard linux box and zipping a
random 250mb file shows an example

--- small mem ---
21.85user 0.44system 0:22.35elapsed 99%CPU (0avgtext+0avgdata 3872maxresident)k
0inputs+512320outputs (0major+287minor)pagefaults 0swaps

--- big mem --
13.45user 0.46system 0:13.94elapsed 99%CPU (0avgtext+0avgdata 4208maxresident)k
0inputs+512088outputs (0major+307minor)pagefaults 0swaps

Obviously not for everyone, but I think it is a useful config option.

-i

---
 archival/Config.src |   10 ++++++++++
 archival/gzip.c     |    6 +++++-
 2 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/archival/Config.src b/archival/Config.src
index 81788ec..9f49081 100644
--- a/archival/Config.src
+++ b/archival/Config.src
@@ -187,6 +187,16 @@ config FEATURE_GZIP_LONG_OPTIONS
        help
          Enable use of long options, increases size by about 106 Bytes

+config GZIP_BIG_MEM
+       bool "Trade memory for gzip speed"
+       default n
+       depends on GZIP
+       help
+         Enable big memory options for gzip, including larger I/O
+         buffers and bigger hash tables.  Faster, but uses at least
+         twice as much memory.  Select if speed is more important than
+         memory use.
+
 config LZOP
        bool "lzop"
        default y
diff --git a/archival/gzip.c b/archival/gzip.c
index 403eb4d..967d284 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -81,7 +81,11 @@ aa:      85.1% -- replaced with aa.gz

 /* ===========================================================================
  */
-#define SMALL_MEM
+#ifdef CONFIG_GZIP_BIG_MEM
+# define BIG_MEM
+#else
+# define SMALL_MEM
+#endif

 #ifndef INBUFSIZ
 #  ifdef SMALL_MEM
-- 
1.7.4.1

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to