Solved

Squid and Speed limit

Posted on 2009-06-27
6
1,974 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
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 250 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Weird Samba Connectivity Issue... 7 53
Penetration Testing home based work 3 91
number in printf 13 32
Syslog-ng works. Now what? How to filter and manage? 8 64
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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.
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.

830 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