LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-07-2015, 08:49 AM   #1
Foxhound
LQ Newbie
 
Registered: Jul 2014
Posts: 17

Rep: Reputation: Disabled
Traffic Control - Could use some feedback about its usage


I want to use TC on one of my servers. I have been reading a guide about how to use it: http://www.tldp.org/HOWTO/html_singl...Control-HOWTO/
But I am pretty novice (but trying hard to learn) to all this Linux stuff so before I actually totally fubar the server I hope people here with more knowledge about TC can tell me if my planned additions are ok.

This is for a server which is purely used to serve static files (rar,zip,exe etc).
The server has a 1GB port and I want to limit traffic on port 80 to 950MB/s so I can use the rest for other connections cause currently (I have a busy website) at peak hours the connection is fully used and makes it hard for me to, for example, connect to it using FTP to upload new files.
Also this server makes a DB connection to another server and when the 1GB is fully used there is no more room for the DB connection so users get a DB connection error.


There are no current rules as far as I can see cause tc -s qdisc ls dev eth0 outputs:
PHP Code:
qdisc mq 0root
 Sent 150251984620065 bytes 95518580 pkt 
(dropped 3321665overlimits 0 requeues 1185698136)
 
rate 0bit 0pps backlog 261995b 300p requeues 1185698136 
Now I want to add the following:
PHP Code:
tc qdisc add dev eth0 root handle 1:0 htb default 2
tc 
class add dev eth0 parent 1:0 classid 1:2 htb rate 962560kbps ceil 972800kbps prio 0
iptables 
-A OUTPUT -t mangle -p tcp --sport 80 -j MARK --set-mark 2 
I copied the above from another site which had a guide about TC and edited it to my needs.


I hope someone who knows TC is willing to check the above and let me know if I am on the proper path with my code. Or maybe tell me what I should change to make this work better.

Thanks in advance for the assistance!
 
Old 04-10-2015, 09:43 AM   #2
Foxhound
LQ Newbie
 
Registered: Jul 2014
Posts: 17

Original Poster
Rep: Reputation: Disabled
Nobody has any tips or feedback regarding this?
I guess I will just have to try and see what happens

Thanks anyway!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Traffic Shaping VoiP using TC (Traffic Control) is this working? Nemus Linux - Networking 0 05-16-2011 01:45 PM
Should traffic control root qdsic & child class limit traffic? Washington Ratso Linux - Networking 0 02-23-2011 07:16 PM
tc traffic control tc traffic control Linux QoS control tool(noob help) inv|s|ble Linux - General 1 07-26-2007 11:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration