mod_bwshare

Takashi Hosono  

Posted in 7 月 7th, 2008 8:32:02 PM JST+0900

Published in Apache

Tags:

Leave your reply

apache 2.2での帯域制限はどうすればいいのかなぁ, と.
mod_bwshareなるものがあるらしい.
とりあえずつかってみることにする.

mod_bwshare
http://www.topology.org/src/bwshare/README.html

ダウンロードしたらunzip.
apxsがなかったらyumなど利用して使えるようにする.

# yum search apxs
httpd-devel.i386 : Development tools for the Apache HTTP server.

# yum -y install httpd-devel

apxsが使えるようになったら, これでok.

# apxs -i -a -c ./mod_bwshare.c

設定をhttpd.confに書き加える.

# vi /etc/httpd/conf/httpd.conf

既にこの一行くらいは書き込まれているのかもしれない.

LoadModule bwshare_module /usr/lib/httpd/modules/mod_bwshare.so

設定はこのへんをみるとよいかと.
http://www.atmarkit.co.jp/flinux/rensai/apache2_08/apache08c.html

ここ重要. ここをシッカリ設定しなければ導入した意味がない, よね.

BW_tx1cred_rate: sets the maximum rate of serving files (files/second).
BW_tx1debt_max: sets the maximum files to serve in excess of BW_tx1cred_rate (files).
BW_tx2cred_rate: sets the maximum rate of serving bytes (bytes/second).
BW_tx2debt_max: sets the maximum bytes to serve in excess of BW_tx2cred_rate (bytes).

設定終わったら

# apachectl -t
# /etc/rc.d/init.d/httpd restart

いじょ.

Recent Post

flickr

www.flickr.com
This is a Flickr badge showing public photos and videos from ほっそー. Make your own badge here.

Monthly archives

Calendar

2008 年 7 月
    12 月 »
 123456
78910111213
14151617181920
21222324252627
28293031  

Favorites

Events

nico video

Temp links

Categories

Search

Amazon Affiliate

Banner

Valid XHTML 1.0 Transitional