trickle moga2 okeee...

| Friday, May 11, 2007

Iseng2 nyoba bwlimit & port priority, namanya trickle bisa running di linux, *BSD.
Bismillah.. let's give it a try.. cihuyyyy....

1. Download tarballnya trickle dulu dunk & ekstrak
# fetch http://monkey.org/~marius/trickle/trickle-1.06.tar.gz
2. Sebelum di install, libevent perlu diinstall dolo kalee...
# fetch http://monkey.org/~provos/libevent-1.3b.tar.gz

Nah setelah semua terinstall, 2 program akan terinstall yaitu trickle dan trickled.

Trickle bisa digunakan secara instan tanpa konfigurasi script, misalna sbb :
# trickle -d 50 wget ftp://mirror.switch.ch/i386/iso/F-6.92-i386-DVD.iso
artinya kita melimit 50Kbps u. download via ftp dr situs tsb.

Trickled bisa digunakan dengan konfigurasi dalam file /etc/trickled.conf
# trickled -c /etc/trickled.conf
/etc/trickled.conf
[ssh]
Priority = 1
Time-Smoothing = 0.1
Length-Smoothing = 1
[ftp]
Priority = 8
Time-Smoothing = 5
Length-Smoothing = 20
[www]
Priority = 2
Time-Smoothing = 0.1
Length-Smoothing = 2

Priorty terendah adalah prioritas utama.

Time smoothing is defined in seconds and is meant to define the time intervals trickled uses to let the application transceive data. The smaller the value, the smoother the session will feel. For example, suppose you limit the FTP transfer to 50Kbps, and have time smoothing set to 1 second. You should get a transfer rate of exactly 50Kbps. If you increase the traffic smoothing number to a higher value (15 seconds, for example), the transfer rate may change between 40 and 60Kbps. With different limitations you'll get different numbers.

Length smoothing defines the smoothing fallback time. That is, if trickled cannot meet the requested smoothing time, it will instead fall back to sending the number of KB of data specified here. If no value is specified, the default is 10Kbps.

You can also use trickled to set global traffic limits, so that you don't need to specify each time the maximum upload and download volumes. For instance, if you want to globally set the download limit to 80Kbps and the upload limit to 10Kbps, you can use a command like:

~# trickled -d 80 -u 10 -s

Note that even when trickled is running, you still need to use trickle binary to run SSH, FTP, HTML, and other commands in order to make traffic shaping work. But when trickled is running, you don't need to specify any parameters to the trickle command.

http://monkey.org/~marius/pages/?page=trickle
read the trickle technical paper

0 komentar: