On 11/28/16 22:32 , 郑圆杰 wrote: > Hi, > > I got some problems using dladm to limit bandwith of vnic in smartos(20160921) > > > 1) I enforce a bandwith limit to 1G using dladm set-linkprop –z <uuid> -t > –p maxbw=1G eth0. > > I can ping the ip and wget file for the ip. > > It work fine and the behavior same as expected > > > > 2) Then I try decrease the bandwith using dladm set-linkprop –z <uuid> > -t –p maxbw=100M eth0. > > At first, I can ping the ip. > > Then I try to wget file from ip, and it failed and I can not even ping the ip > anymore. > > 3) Increase the bandwith to 1G using dladm set-linkprop –z <uuid> -t –p > maxbw=1G eth0. > > It work fine again. > > Same issule mentioned on github. > https://github.com/joyent/smartos-live/issues/357 > > Any Idea on it ?
The dladm bandwidth logic here restricts bandwidth to be one packet per tick. Unfortunately there's a bug where it doesn't properly take into account the tick rate of the system (being 100hz or 1000hz) so it may erroneously think that an amount of bandwidth specified is sufficient when it isn't. There are a couple ways out of it, but this area likely needs work in general. Robert ------------------------------------------- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
