View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 10 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Tue Aug 16, 2005 10:11 pm 
Offline
Joined: Fri Mar 26, 2004 9:00 am
Posts: 239
Just a suggestion, perhaps the gzip compression should be enabled, by default, for the mythweb module/apache, as this makes for dramatically faster downloads.

I'd offer to contribute the info on how to do it, but embarassingly, I don't know. A friend helped me do it awhile ago and I recently upgraded and lost the change...

-Jeff


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 16, 2005 10:41 pm 
Offline
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location: Nashville, TN
wow look the second person who has made this suggestion without telling us how to do it. at least you were nice about it the last guy was rather rude and never bothered to give any instructions. If you could get the instructions from your friend and post them it might just become the default.

_________________
Have a question search the forum and have a look at the KnoppMythWiki.

Xsecrets


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 17, 2005 2:35 am 
Offline
Joined: Thu Sep 09, 2004 4:26 am
Posts: 77
Location: Sweden
Here is what I've done to get mod_gzip working on my R5A12 system. Should apply on other versions also.

1. Get the mod-gzip. I dunno if this is really needed
Code:
root@mythtv# apt-get install libapache-mod-gzip

Keep the current version of httpd.conf if asked.

2. Edit /etc/apache/modules.conf, add at end:
Code:
LoadModule gzip_module /usr/lib/apache/1.3/mod_gzip.so


3. Edit /etc/apache/httpd.conf, add at the end:
Code:
<IfModule mod_gzip.c>
mod_gzip_on                 Yes
mod_gzip_can_negotiate      Yes
mod_gzip_dechunk            Yes
mod_gzip_minimum_file_size  600
mod_gzip_maximum_file_size  0
mod_gzip_maximum_inmem_size 100000
mod_gzip_keep_workfiles     No
mod_gzip_temp_dir           /tmp
mod_gzip_item_include       file \.html$
mod_gzip_item_include       file \.txt$
mod_gzip_item_include       file \.jsp$
mod_gzip_item_include       file \.php$
mod_gzip_item_include       file \.pl$
mod_gzip_item_include       mime ^text/.*
mod_gzip_item_include       mime ^application/x-httpd-php
mod_gzip_item_include       mime ^httpd/unix-directory$
mod_gzip_item_include       handler ^perl-script$
mod_gzip_item_include       handler ^server-status$
mod_gzip_item_include       handler ^server-info$
mod_gzip_item_exclude       file \.css$
mod_gzip_item_exclude       file \.js$
mod_gzip_item_exclude       mime ^image/.*
</IfModule>


If you want to see the result of the compression rate, edit /etc/apache/httpd.conf . Make the log format look like this:

Code:
#LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{forensic-id}n\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" mod_gzip: %{mod_gzip_compression_ratio}npct."
 combined


The result for me is 92 percent compression of recorded program listning with 80 recordings. 85 percent for the program listning. The apache logfile is in /var/log/apache/access.log. (must be root to read it)

Edit: I forgot to restart the apache server

Code:
#/etc/init.d/apache restart


Last edited by ille on Wed Aug 17, 2005 3:13 am, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 17, 2005 2:53 am 
Offline
Joined: Sun Jul 24, 2005 1:37 am
Posts: 42
Nice. That is even easier than how I was going to suggest.

Though if the goal is to keep an unmodified httpd.conf (and I'm not sure if it is unmodified, but it really looks like it..) one could just add the additions to say /etc/apache/conf.d/gzip and have it work fine too.

Code:
LoadModule gzip_module /usr/lib/apache/1.3/mod_gzip.so

<IfModule mod_gzip.c>
mod_gzip_on                 Yes
mod_gzip_can_negotiate      Yes
mod_gzip_dechunk            Yes
mod_gzip_minimum_file_size  600
mod_gzip_maximum_file_size  0
mod_gzip_maximum_inmem_size 100000
mod_gzip_keep_workfiles     No
mod_gzip_temp_dir           /tmp
mod_gzip_item_include       file \.html$
mod_gzip_item_include       file \.txt$
mod_gzip_item_include       file \.jsp$
mod_gzip_item_include       file \.php$
mod_gzip_item_include       file \.pl$
mod_gzip_item_include       mime ^text/.*
mod_gzip_item_include       mime ^application/x-httpd-php
mod_gzip_item_include       mime ^httpd/unix-directory$
mod_gzip_item_include       handler ^perl-script$
mod_gzip_item_include       handler ^server-status$
mod_gzip_item_include       handler ^server-info$
mod_gzip_item_exclude       file \.css$
mod_gzip_item_exclude       file \.js$
mod_gzip_item_exclude       mime ^image/.*
</IfModule>


-Aubrey


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 17, 2005 7:18 am 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
This tip rocks, particularly for getting MythWeb pages out through fairly low-bandwidth upstream pipes like with cable modem. Pages display noticeably faster now, particularly listings.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 17, 2005 10:14 pm 
Offline
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location: Fontana, Ca
This is what I'm talking about! I've added this to the next release (when it is done...).

_________________
cesman

When the source is open, the possibilities are endless!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 19, 2005 8:13 pm 
Offline
Joined: Fri Mar 26, 2004 9:00 am
Posts: 239
Good. It's nice to make a suggestion that has value. All's well that ends well. Thanks to everyone who explained how to implement the suggestion.

-Jeff

PS - XSecrets, I would have asked my buddy but he left for the UK a week ago and isn't due back for a few weeks.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 19, 2005 10:56 pm 
Offline
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1532
Location: California
Very nice -- seems to average 89% compression when I go to list "recorded programs". I am working across an 802.11b wireless network, and the speedup is noticable, although I have not done any precise measurements.


Marc


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 20, 2005 6:54 am 
Offline
Joined: Fri Mar 26, 2004 9:00 am
Posts: 239
As a point of interest, all modern browsers support dynamic unzipping of Gzipped content, so any web based content and benefit from this change. However, only 5% of websites world wide using Gzip. It's a huge win for most things... Just thought I'd mention it as its applicable to a lot of different things...

-Jeff


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 23, 2005 2:23 am 
Offline
Joined: Sun Aug 07, 2005 3:02 pm
Posts: 12
Well, I've tried everything suggested above and I still can't get this to work. :(
The log file shows "mod_gzip: 0pct" every time. I'm using R5A16 and Apache/1.3.33 (Debian GNU/Linux). If anyone has any more ideas...


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu