06-26-2007
How to reduce GZIP memory usage
I am using the ZLIB_VERSION "1.2.3" . The memory requirement for Zlib/GZIP compression is stated as
/* The memory requirements for deflate are (in bytes):
(1 << (windowBits+2)) + (1 << (memLevel+9))
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
plus a few kilobytes for small objects. For example, if you want to reduce
the default memory requirements from 256K to 128K, compile with
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
Of course this will generally degrade compression */
If I can make changes to these macro to reduce memory consumption,
MAX_WBITS=14
MAX_MEM_LEVEL = 7
How it will effect the GZIP compression method ?
Now what would be the memory requirement for window size, the size of Heads of the hash chains
and prev pointer which is basically linking to older string with the same hash index?
Also, what are the various ways to reduce memory usage?
10 More Discussions You Might Find Interesting
1. Programming
how can i monitor usages of CPU, Memory, Hard disk etc. under SUN Solaries
through a c program or java program
i want to store that data into database so i can show it graphically
thanks in advance (2 Replies)
Discussion started by: Gajanad Bihani
2 Replies
2. HP-UX
Refer from title:
How can i get memory used or anything that can show memory from sar file
example on solaris:-
we can use sar with option to show memory used at time that sar crontab run.
on HP-UX, it not has option to see memory used. But i think it may be have some parameter or some... (1 Reply)
Discussion started by: panithat
1 Replies
3. HP-UX
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies
4. Linux
We are working in the office where about 5-6 machines have Internet access. We pay for each GB of traffic we consume and that's quite expensive. Almost no worker download files. Just surfing websites (including our corporate one that is located outside of local network thus we pay for accessing it... (5 Replies)
Discussion started by: FractalizeR
5 Replies
5. Solaris
Hi,
I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP.
I want the oids for above tasks.
can you please tell me that
Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies
6. AIX
How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
Can you please tell me the command, with which one can know the amount of space a specific directory has used.
df -k . ---> Displays, the amount of space allocated, and used for a directory.
du -k <dir name> - gives me the memory used of all the files inside <dir>
But i... (2 Replies)
Discussion started by: abhisheksunkari
2 Replies
8. AIX
Frequently i am getting "total CPU is now 100.00%, which is above the error threshold (90%)" this error . (3 Replies)
Discussion started by: ranjithm
3 Replies
9. UNIX for Dummies Questions & Answers
Let's say i have 20 users logged on Server. How can I know how much memory percent used each of them is using with system time in each user? (2 Replies)
Discussion started by: roy1912
2 Replies
10. Red Hat
We have several dozen Redhat 5, 6 and 7 servers that are running Oracle databases. On some databases we are using automatic memory management, which uses shared memory. On other databases we are use manual memory management, which does not use shared memory.
When I see that a server is swapping... (2 Replies)
Discussion started by: gandolf989
2 Replies
LEARN ABOUT DEBIAN
ns_setgzipproc
Ns_Gzip(3aolserver) AOLserver Library Procedures Ns_Gzip(3aolserver)
__________________________________________________________________________________________________________________________________________________
NAME
Ns_Gzip, Ns_SetGzipProc - GZIP compression support
SYNOPSIS
#include "ns.h"
int
Ns_Gzip(buf, len, level, dsPtr)
void
Ns_SetGzipProc(proc)
ARGUMENTS
Tcl_DString dsPtr (out) Output buffer to placed compressed string.
int len (in) Length of string pointed to by buf.
char *buf (in) Pointer to string to compress.
int level (in) Requested GZIP compression level.
Ns_GzipProc proc (in) Procedure to GZIP content.
_________________________________________________________________
DESCRIPTION
These functions enable GZIP compress of text buffers.
int Ns_Gzip(buf, len, level, dsPtr)
This function compresses a string pointed to by buf of length len, appending the output to the given dsPtr. The output buffer must
already be initialized. The level parameter specifies the compress level between 0 and 9; see the documentation in the zlib.h for
details.
The function will return NS_OK if compression was successful, otherwise NS_ERROR. A call to Ns_SetGzipProc to install a compression
function must have already occured. The nszlib module will install a suitable function when loaded.
void Ns_SetGzipProc(proc)
This function is used to install a compression function for Ns_Gzip. A call to Ns_SetGzipProc would normally be in the module-load
routine of a module which provides compression support, e.g., the nszlib module. The function should match the type Ns_GzipProc:
typedef int Ns_GzipProc(
char *buf, int len, int level, Tcl_DString *dsPtr
);
KEYWORDS
compress, gzip
AOLserver 4.5 Ns_Gzip(3aolserver)