Defenestration Posted October 25, 2006 Posted October 25, 2006 I know enabling GZIP compression saves on bandwidth, but how does it affect server load (ie. CPU and RAM) ?
bfarber Posted October 25, 2006 Posted October 25, 2006 If gzip is used, the server has to compress the files, so technically it does use a bit of server load. However, unless you set the compression level to like 9, it should be fine.
cmanns Posted October 25, 2006 Posted October 25, 2006 If gzip is used, the server has to compress the files, so technically it does use a bit of server load. However, unless you set the compression level to like 9, it should be fine.How do you change the compression?
neen Posted October 26, 2006 Posted October 26, 2006 How do you change the compression?It's a setting in the admin area, in the same spot as "Use compression?."
bfarber Posted October 26, 2006 Posted October 26, 2006 How do you change the compression?http://us3.php.net/manual/en/function.ob-gzhandler.phpob_gzhandler compression level use zlib.output_compression_level, which is -1 per default, level 6. To change the compression level on the fly, simply use ini_set: <?php ini_set('zlib.output_compression_level', 1); ob_start('ob_gzhandler'); echo 'This is compressed at level 1'; ?>Note that I haven't really played around with this much - I've set compression level in scripts when using zlib.output_compression, but not ob_gzhandler. It's safer to just leave it on the server default usually.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.