Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an TCP server application running on a Nexenta NCP 3 box. I would like to limit how much outgoing bandwidth it can use. Is it possible in Solaris to rate limit an application like I can in Linux?

I've seen mention of IPQoS and Crossbow, but can't find anything that tying it all together.

share|improve this question

2 Answers 2

Crossbow is AMAZING. It can do some many things really simply. What you want to look at is the usage of the flowadm command.

What you are looking to do is just a one line command that will look very much like the following :

flowadm add-flow -l bge0 -a transport=UDP -p maxbw=100M, priority=low limit-udp-1

Obviously, you want to replace the appropriate information.

Here is another example that will most likely suit you better.

flowadm add-flow -l xnf0 -a remote_ip=193.49.161.207,remote_port=43833 flow-tcp-app
flowadm set-flowprop -p maxbw=8M flow-tcp-app

That's all you've gotta do. You may be looking at local_ip instead of remote_ip but that doesn't change much. No needs for zones if you don't need them. Nice, isn't it ?

share|improve this answer
    
I tried this, but ran into an limitation of Crossbow. Where I wanted to limit the app down to 15 KiB/s Crossbow could only go down to 1.5 MBit/s (size of a ethernet frame) –  Myers C May 21 '10 at 16:23
    
That's right indeed. Crossbow is not really made for ADSL lines and such. –  Antoine Benkemoun May 21 '10 at 16:58

One way to do it would be to install that application in a zone. This zone would have a dedicated vnic with crossbow bandwidth limitation enabled. NAT would be used for allowing ingoing/outgoing zone trafic.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.