Start-2-M-SATA Bandwidth

#1

Hi, I have a “Start-2-M-SATA” server from online with “Basic Unmetered 1 Gbit/sec” bandwidth, I used it to host files, My problem is when visitors use all network bandwidth my server be very slow, I want to know is there any limit or anything I can do so the server still alive but with low download speed? or what should I do ?

#2

Assuming you are running some linux distro, the standard utility is “tc” for traffic control. Here is one tutorial from duckgo: https://wiki.archlinux.org/index.php/Advanced_traffic_control

You can search for a better one if that doesn’t meet your needs.

Or maybe you wan’t to limit speed of individual HTTP connections. That is a setting in whatever HTTP server you are using. Apache? Nginx?

1 Like
#3

Thanks for your reply, I am using centos, apache, and I am looking for something to limit the traffic for downloading files to “800mb/sec” and keep “200mb/sec” to keep the server a live, so when it be high network usage download speed begin low and server keep a live

#4

If you want to limit the traffic for all http downloads to 800mb/sec, you can use tc.

Again, still not enough info, but here is something that might be close. You should check out a tutorial.

DEV="eth0"

case "$1" in
clean) tc qdisc del dev $DEV root;;
*)
tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 1000mbit

tc class add dev $DEV parent 1: classid 1:1 cbq rate 800mbit \
allot 1500 prio 5 bounded isolated

tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \
match ip sport 443 0xffff flowid 1:1   # https
tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \
match ip sport 80 0xffff flowid 1:1    # http

tc qdisc add dev $DEV parent 1:1 sfq perturb 10
;;
esac