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
いじょ.




