Solved

Squid and Speed limit

Posted on 2009-06-27
6
1,874 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
  • 2
  • 2
6 Comments
 
LVL 3

Accepted Solution

by:
Siridivi earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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 250 total points
Comment Utility
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
Comment Utility
apology, did not see siridivi mention you can create separate pools while skimming through posts.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now