tag:blogger.com,1999:blog-1702158064458024124.post-91778136978774310872007-10-04T16:10:00.000-07:002007-10-22T17:05:58.201-07:00Throttling bandwidth usage for Miro (formerly Democray Player)Miro is a great software. Unfortunately, there are still some bugs to be ironed out and it can quickly become a bandwidth hog.<br /><br />Sometimes, it hogs so much bandwidth on my macbook that I cannot browse the net or download my email.<br /><br />Hence, I wrote this small script thats uses ipfw and dummynet features of BSD (and OS X Tiger) to throttle bandwidth to ports used by Miro:<br /><br />#sudo ipfw pipe 1 config bw 24Kbit/s<br />#sudo ipfw queue 1 config pipe 1 weight 1<br />#sudo ipfw queue 2 config pipe 1 weight 3<br />#sudo ipfw add 10 queue 1 ip from `hostname` to any src-port 8500-8600<br />#sudo ipfw add 20 queue 2 ip from any 1024-65535 to `hostname`<br /><br />Now, verify that your Miro bandwidth usage goes down in the real-time !!<br /><br />If something is wrong, then type "sudo ipfw flush" and start over.<br /><br />This will not survive a reboot. This will only work for OS X 10.4Tarun Upadhyayhttp://www.blogger.com/profile/12579713795836636167noreply@blogger.com