How to limit throughput on my eth0?

Hi.

I was googling but I cannot find what I need. All articles I could find was how to limit users using bandwidth using squid, proxies etc.

I am flex developer and I was told that my progress bar for loading images is not working properly when connection is bad.
I can’t reproduce the problem because my link is too fast for (supposed) error to occur.

I need, somehow, to not let my eth0 accept more than, let’s say, 5 KB/s, so I can debug the application.


Or… even better, if I could simulate it in localhost…

Thanks!

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quick Google of ‘iptables rate limit’ gave me a bunch of hits:

http://www.geocities.com/youssef116/writing/ratelim.html

Looks like my SLED box has something that looks right for that:

/usr/lib64/iptables/libipt_limit.so

Anyway, iptables (command to work with NetFilter) can do this. Search
for ‘limit’ in this document as well:

http://www.novell.com/coolsolutions/feature/18139.html

Good luck.

beli0135 wrote:
> Hi.
>
> I was googling but I cannot find what I need. All articles I could find
> was how to limit users using bandwidth using squid, proxies etc.
>
> I am flex developer and I was told that my progress bar for loading
> images is not working properly when connection is bad.
> I can’t reproduce the problem because my link is too fast for
> (supposed) error to occur.
>
> I need, somehow, to not let my eth0 accept more than, let’s say, 5
> KB/s, so I can debug the application.
>
> —
> Or… even better, if I could simulate it in localhost…
>
> Thanks!
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJLaLe3s42bA80+9kRAu4tAJ9fUEpZiz6NuyyVMmR6CIcTYohnzQCbB8PQ
92whz9r+5m8SEfcSn1dzfIM=
=MiJ4
-----END PGP SIGNATURE-----

This should likely work:
YaST → Network Devices → Network Settings
Click on the desired device. Edit it. Click the general tab. Set the maximum transfer unit to a slow speed setting. Click next, etc.

I think you don’t understand what the MTU is. It’s not a speed setting. And while setting it to a low value will reduce speed, the reduction is not linear and will not be uniform across all packet sizes.

Thank you all.
I managed to slow transfer speed, but I found out that I cannot resolve problem like this, only see it.
There is no way I can remotely debug the application.
That puts me into daunting make->deploy->restart servers process. Too much time wasted.

I see now that proper solution would be to limit local Jetty server transfer, but that sounds quite difficult.
:\