Recently, in my research, I want to throttle the I/O and network bandwidth of my program so as to show my program is robust in different senarios. In practice, we may also want to limit the resources used by certain programs (rsync, wget, …). Fortunately, this is possible in Linux. Next, I will show how to do it on Ubuntu 14.04. I believe it’s doable on any Linux distributions. For network bandwidth limiting, we will use a program called trickle. Install trickle:

Usage of trickle:

Example: limit the bandwidth for scp under 10MB/s

An alternative for network bandwidth limiting is wondershaper. But I found that tirckle works better. For disk bandwidth limiting, you can use the cgroup[…]

I encounter a problem when I tried to compile the storm-starter project using lein (using Maven internally), because I am behind a fraking proxy. So I add proxy configuration in ~/.m2/settings.xml.

I just followed the instructions in S4 piper walkthrough. I encountered some errors because I am accessing the Internet through a proxy. The problems were solved by modifying the file s4 (needed if you want to run the twitter example):

and the file gradlew (refer to Qun’s article):

Here is the result of the twitter example, top 10 popular words of today: