Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Squid and Speed limit

Posted on 2009-06-27
6
Medium Priority
?
2,114 Views
Last Modified: 2012-05-07
I have linux box with Squid2.6 as proxy server , but i have a problem that when one of the users download via IDM it will consume all bandwidth , is there any way to limit user speed via squid to solve this problem.
0
Comment
Question by:ahfaris
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 3

Accepted Solution

by:
Siridivi earned 1000 total points
ID: 24727784
You need to create a delay pool, for example:

delay_pools 1
delay_class 1 1
delay_access 1 allow all
delay_parameters 1 64000/64000          # 512 kbits == 64 kbytes per second

Then create an ACL for the user you want to restrict, for example:

acl only512kusers src 192.168.1.0/255.255.192.0
delay_pools 1
delay_class 1 3
delay_access 1 allow only512kusers
delay_access 1 deny all
delay_parameters 1 64000/64000 -1/-1 16000/64000

Check out the Wiki:
http://wiki.squid-cache.org/Features/DelayPools?highlight=%28faqlisted.yes%29
0
 

Author Comment

by:ahfaris
ID: 24733869
i used the first scenario to limit the download speed to 512000 , the download then limited but the browsing become very slow , why ?
0
 
LVL 3

Expert Comment

by:Siridivi
ID: 24734591
The function of the delay pool is to slow down traffic. This is something you'll have to fine tune to get results you can live with. You can give your users a larger pool, set limits based on file size, file type, time of day and so on. There is no catch-all, each network environment is different and you'll have to configure SQUID for the best performance on your network.
0
 
LVL 7

Assisted Solution

by:stephenhoekstra
stephenhoekstra earned 1000 total points
ID: 24930747
you can configure separate delay pools, and base them on file extensions.

you create an ACL with these extensions and apply them to a separate delay pool, thus leaving all other traffic uninhibited.

check out http://www.faqs.org/docs/Linux-HOWTO/Bandwidth-Limiting-HOWTO.html#AEN110 for an example, scroll down until you see the magic_words ACL.  the delay pools a further down, towards the end.  it's up to you then to decide which extensions to limit.

if one day you have set this up and find someone is still sucking all your bandwidth, just look in the access.log and see who is downloading what, it could be an extension not listed in your ACL.
0
 
LVL 7

Expert Comment

by:stephenhoekstra
ID: 24930762
apology, did not see siridivi mention you can create separate pools while skimming through posts.
0

Featured Post

When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot has fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question