LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-23-2009, 02:42 AM   #1
Imran Ikram
LQ Newbie
 
Registered: Dec 2009
Posts: 4

Rep: Reputation: 0
Delay Pools in linux squid proxy (help needed)


hi
i am new to linux. i have installed squid but dont know how to implement delay pools. i want users to download any thing but at slow speed.
i have read some configuration on internet but dont know which is what
configurations are
acl accounts src 192.168.0.1-192.168.9.255/255.255.255.0
delay parameters 1 62500/62500 6250/6250

my internet connection is of 2mb shared link and download file at 190 kbps

kindly suggest what should i put in 62500/62500 and 6250/6250 in my scenario so users will not get download more than 6kps constantly.

thanks
 
Old 12-23-2009, 03:15 AM   #2
baltho
Member
 
Registered: Aug 2004
Location: Adelaide, South Australia
Distribution: Ubuntu (Natty)
Posts: 38

Rep: Reputation: 18
Hiya,

Have a look at http://www.visolve.com/squid/squid30...lay_parameters which explains it pretty well, i think.

If I'm reading it correctly, you should have roughly 800/800 to achieve a 6k limit, and how many times you say it depends on whether you want to limit the total, individual hosts, a subnet, or a given user no matter where they're logged in.
I thought at first that the "1" at the beginning was the "class" of pool, but it's not: it's the number of parameters that determines what they mean. All there in the docs, though, and there's an example at http://www.visolve.com/squid/Squid_tutorial.php (about half-way down the page).
 
Old 12-23-2009, 03:50 AM   #3
Imran Ikram
LQ Newbie
 
Registered: Dec 2009
Posts: 4

Original Poster
Rep: Reputation: 0
hi
the document i am reading says
(2. Class 2 pool allows to set the bandwidth usage to a sustained rate
Using the class 2 pool we can overcome the Limitation of max out in class1. So here we can implement the Bandwidth in aggregate rate.
Configure the class 2 pool:
If we have a Link with bandwidth of -(1.5Mb/s) 1544000 bytes/s of bandwidth.
If we need to limit or set ceiling of 62500 bytes/s (500k/s) as bandwidth for the netusage and 10% of the ceiling for each user.
# vim squid.conf
acl bw_users src 192.168.1.0/24
# The acl defined for the Network
delay_pools 1
# Number of Pool
delay_class 1 2
# Defines the class of pool for the Pool Number 1
delay_parameters 1 62500/62500 6250/6250
# This tells to create a ceiling of 500K (62500) for our bandwidth having (1.5M) with a individual ceiling of #10% of the ceiling (Any given time the users will be restricted to the 10% of the ceiling bandwidth 500k)
delay_access 1 allow bw_users
# This is the access tag which tie to the acl bw_users
# squid service reload


1. want to know how they get 1544000 bytes/s from 1.5 Mb/s (The formula)
2. what is 62500/62500 and 6250/6250 in the scenario
should i write 1 2048000/2048000 800/800
thanks
 
Old 12-24-2009, 01:26 AM   #4
baltho
Member
 
Registered: Aug 2004
Location: Adelaide, South Australia
Distribution: Ubuntu (Natty)
Posts: 38

Rep: Reputation: 18
Hiya,
The figures are in bytes, not bits, and the 64kbps they mention is k-bits, so 8000 (bytes) is 64k-bits. 62500, then should just be 62500. (I'm not very familiar with this aspect of squid - feeling my way through just like you).
Class 2 is correct: the first slash-pair is the total bandwidth, the second one - "individual" is per-machine.
So I think your delay_parameters 1 62500/62500 6250/6250 should be correct.
Hope this helps...

Last edited by baltho; 12-24-2009 at 01:27 AM.
 
1 members found this post helpful.
Old 12-24-2009, 01:34 AM   #5
Imran Ikram
LQ Newbie
 
Registered: Dec 2009
Posts: 4

Original Poster
Rep: Reputation: 0
hi
thankyou for the previous reply. i have done the configuration mentioned below

acl accounts src 192.168.0.1-192.168.0.133/255.255.255.0
acl accounts src 192.168.0.135-192.168.0.254/255.255.255.0
acl full src 192.168.0.134/255.255.255.0

http_access allow accounts
http_access allow full
http_access deny all

delay_pools 1
delay_class 1 2
delay_parameters 1 9000000/9000000 25000/25000
delay_access 1 allow accounts
delay_access 1 deny full
delay_access 1 deny all

well why all my ips are getting the speed i mentioned in delay pool, even 192.168.0.134, as i have excluded it in delay pool. what is wrong with the configuration. i want 192.168.0.134 to get maximum speed available, while rest of the network goes with the mentioned speed.
thanks in advance
 
Old 12-24-2009, 01:41 AM   #6
baltho
Member
 
Registered: Aug 2004
Location: Adelaide, South Australia
Distribution: Ubuntu (Natty)
Posts: 38

Rep: Reputation: 18
If could be the netmask: 255.255.255.0 on the end means it ignores the last number, so your 2 accounts acl lines are referring to the entire 192.168.0.X subnet. And then the first matching rule is always applied: you could try removing the /255... and also putting the delay_access 1 deny full as the first of those 3 lines at the end.
 
  


Reply



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
squid delay pools moekad Linux - Networking 5 08-28-2009 11:07 AM
Squid delay pools suhas! Linux - Server 1 12-01-2007 12:49 PM
Squid delay pools Bilal84 Linux - Security 1 04-27-2005 08:38 AM
Squid Delay pools Bilal84 Linux - Networking 1 04-26-2005 03:07 PM
Squid Delay Pools being overrun Redleg Linux - Networking 8 07-03-2004 07:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:26 AM.

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