Solved

Squid and Speed limit

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

920 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

13 Experts available now in Live!

Get 1:1 Help Now