rejetto forum

Speed Limit

therise · 11 · 3243

0 Members and 1 Guest are viewing this topic.

Offline therise

  • Occasional poster
  • *
    • Posts: 14
    • View Profile
Just want to ask, is it possible if for example, max speed is 1MB/s. Then got 10 different IP connecting to my server. Then it will limit the speed into 100KB/s per IP. But when 20 different IP connecting, the limit change to 50KB/s. It more about ratio/percentage to have fair speed to each user.

Thanks in advanced.  ;D


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13489
    • View Profile
it will be possible from next release of HFS 2.3 (build number 276).
The current one lacks the needed feature.

I leave her the instructions you'll have to use with it:
ALT+F6 and put this very simple script
Code: [Select]
[+connected=+disconnected]
{.set speed limit for address|{.div|1000|{.max|1|%number-addresses%.}.}.}


Offline therise

  • Occasional poster
  • *
    • Posts: 14
    • View Profile
First of all, I would like to thank you rejetto for your reply.

Hmm.. I'm a bit newbie on this, after putting
Code: [Select]
[+connected=+disconnected]
{.set speed limit for address|{.div|1000|{.max|1|%number-addresses%.}.}.}

What I have to do next? I did search around this forum but I can't find any (may be I use wrong keyword). Where can I get those guide?

Btw, we are looking forward for build 276! Totally awesome!


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2057
    • View Profile
Hmm.. I'm a bit newbie on this,

 I did search around this forum but I can't find any (may be I use wrong keyword). Where can I get those guide?

http://www.rejetto.com/forum/index.php?topic=1939.msg1032472#msg1032472

 ;)


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13489
    • View Profile

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13489
    • View Profile
the version above works perfectly, but in case you get 3 connections, you get 333.333333333333 KB/s limit for connection.
this version instead avoids the useless decimals

[+connected=+disconnected]
{.set speed limit for address|{.round|{.div|1000|{.max|1|%number-addresses%.}.}.}.}


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13489
    • View Profile
as a plus, i'll add the possibility for scripts to read the current speed limit.
So that the above script may depend on the global speed limit, instead of the fixed number 1000.


Offline therise

  • Occasional poster
  • *
    • Posts: 14
    • View Profile
as a plus, i'll add the possibility for scripts to read the current speed limit.
So that the above script may depend on the global speed limit, instead of the fixed number 1000.

so the 1000 is fixed? how if i want to make for example, when the speed 1200 and got 4 connection each can get 300... and when the speed suddenly change to 1600 and each can get 400.... is that possible?

Thanks for both rojetto and Mars helping me. I really appreciate it.  :D


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13489
    • View Profile
don't you see the 1000 in the script i gave you?
you can just change that number.


Offline therise

  • Occasional poster
  • *
    • Posts: 14
    • View Profile
don't you see the 1000 in the script i gave you?
you can just change that number.


Sorry~ sorry~
I don't know that I can change the number for change whole speed.. Thanks again. Peace...  :D


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13489
    • View Profile
anyway, if you prefer, you can replace the 1000 with {.get|speed limit.}
and you will set the limit from HFS menu.