Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Squid extra delay pools - Limiting Youtube bandwidth

    Scheduled Pinned Locked Moved Cache/Proxy
    16 Posts 8 Posters 31.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • belleraB
      bellera
      last edited by

      At Console or at WebGUI: Diagnostics: Execute command

      $ find / -name squid.conf
      /usr/pbi/squid-amd64/etc/squid/squid.conf
      /usr/pbi/squidguard-squid3-amd64/etc/squid/squid.conf
      

      or

      ps aux | grep squid
      

      The used squid.conf is /usr/pbi/squid-amd64/etc/squid/squid.conf

      If you have squidGuard installed you can see squid.conf at Proxy filter SquidGuard: Log page: Proxy config

      1 Reply Last reply Reply Quote 0
      • belleraB
        bellera
        last edited by

        @bellera:

        Problem

        • squid.conf has two lines delay_pools (one from default configuration, other from my Custom Options).
        • But it seems not to be important.

        At cache.log it says:

        2014/04/08 11:38:55 kid1| parse_delay_pool_count: multiple delay_pools lines, aborting all previous delay_pools config
        

        Limited bandwidth for Youtube is working, however.

        1 Reply Last reply Reply Quote 0
        • belleraB
          bellera
          last edited by

          Adding LAN Address to Proxy server: Cache management: External Cache-Managers permits to work with squidclient and see delay pools state

          [2.1-RELEASE][admin@proxy.mydomain.tld]/root(45): squidclient -h proxy.mydomain.tld mgr:delay
          HTTP/1.1 200 OK
          Server: squid/3.3.10
          Mime-Version: 1.0
          Date: Tue, 08 Apr 2014 18:01:38 GMT
          Content-Type: text/plain
          Expires: Tue, 08 Apr 2014 18:01:38 GMT
          Last-Modified: Tue, 08 Apr 2014 18:01:38 GMT
          X-Cache: MISS from proxy.mydomain.tld
          X-Cache-Lookup: MISS from proxy.mydomain.tld:3128
          Via: 1.1 proxy.mydomain.tld (squid/3.3.10)
          Connection: close
          
          Delay pools configured: 2
          
          	Misconfigured pool.
          
          Pool: 2
          	Class: 1
          
          	Aggregate:
          		Max: 512000
          		Restore: 512000
          		Current: 417287
          
          Memory Used: 760 bytes
          

          About squidclient, https://forum.pfsense.org/index.php?topic=74816.msg408690#msg408690

          1 Reply Last reply Reply Quote 0
          • belleraB
            bellera
            last edited by

            Modifying squid.inc code solves (of course) the warning:

            diff squid.inc squid.inc-2014-04-08
            1506c1506
            < delay_pools 2
            ---
            > delay_pools 1
            

            So, at Custom Options, no delay_pools line:

            # Limiting YOUTUBE at 8 * 512.000 Byte/s = 4.096.000 bit/s = 4 Mbit/s
            delay_class 2 1
            delay_parameters 2 512000/512000
            acl YOUTUBE dstdomain .googlevideo.com
            delay_access 2 allow YOUTUBE
            

            squidclient -h proxy.mydomain.tld mgr:delay

            Delay pools configured: 2
            Pool: 1
            	Class: 2
            	Aggregate:
            		Disabled.
            	Individual:
            		Disabled.
            Pool: 2
            	Class: 1
            	Aggregate:
            		Max: 512000
            		Restore: 512000
            		Current: 512000
            

            It would be a good option to have a box for indicating the number of delay pools desired.

            1 Reply Last reply Reply Quote 0
            • belleraB
              bellera
              last edited by

              Oops!

              It doesn't works. It seems that default delay pool with unlimited bandwidth causes my delay pool for YOUTUBE not to work.

              Reverting to first solution…

              1 Reply Last reply Reply Quote 0
              • C
                cheonne
                last edited by

                hi bellera, is this working on https://www.youtube.com?

                1 Reply Last reply Reply Quote 0
                • belleraB
                  bellera
                  last edited by

                  @bellera:

                  Reverting to first solution…

                  First solution it works.

                  1 Reply Last reply Reply Quote 0
                  • C
                    cheonne
                    last edited by

                    what you mean by first solution sir?
                    is it default settings in delay pools ("1") without hacking in squid.inc to "2"? thanks

                    1 Reply Last reply Reply Quote 0
                    • belleraB
                      bellera
                      last edited by

                      From…

                      @bellera:

                      Tested with squid3-dev 3.3.10 pkg 2.2.1 not transparent (intercept) mode

                      I need to limit the use of Youtube at my main installation.

                      To…

                      @bellera:

                      About squidclient, https://forum.pfsense.org/index.php?topic=74816.msg408690#msg408690

                      1 Reply Last reply Reply Quote 0
                      • P
                        pfirewa
                        last edited by

                        bom dia
                        good day

                        I need your help

                        I have a link of 10MB and want to separate the network 192.168.1.0/24 4Mb link to the extensions specified here and the youtube site:

                        (./..(avi|mpg|mpeg|mpe|m1v|m2v|mpv2|mp2v|pva|evo|m2p|ts|tp|trp|m2t|m2ts|mts|rec|vob|ifo|mkv|webm|mp4|m4v|mp4v|mpv4|hdmov|mov|3gp|3gpp|swf|3ga|3g2|3gp2|flv|f4v|ogm|ogv|rm|ram|rt|rp|rmm|wmv|wmp|wm|asf|smk|bik|fli|flc|flic|dsm|dsv|dsa|dss|ivf|d2v|divx|rmvb|amv|ac3|dts|aif|aifc|aiff|alac|amr|ape|apl|au|snd|cda|flac|m4a|m4b|m4r|aac|mid|midi|rmi|mka|mp3|mpa|mp2|m1a|m2a|mpc|ofr|ofs|ogg|oga|opus|ra|tak|tta|wav|wma|wv|aob|mlp|asx|m3u|m3u8|pls|wvx|wax|wmx|mpcpl|mpls|bdmv|vbr|wmv8|psp|mpg1|mpg2|mpeg-4|mpeg4|flv|f4v|swf))

                        how to do it?

                        1 Reply Last reply Reply Quote 0
                        • A
                          alextech0x
                          last edited by

                          @bellera:

                          Tested with squid3-dev 3.3.10 pkg 2.2.1 not transparent (intercept) mode

                          I need to limit the use of Youtube at my main installation.

                          I added, at Custom Options,  the following lines (Youtube serves now the videos from googlevideo.com domain):

                          # Limiting YOUTUBE at 8 * 512.000 Byte/s = 4.096.000 bit/s = 4 Mbit/s
                          delay_pools 2
                          delay_class 2 1
                          delay_parameters 2 512000/512000
                          acl YOUTUBE dstdomain .googlevideo.com
                          delay_access 2 allow YOUTUBE
                          

                          Mr, Can i set the same configuration for different sites or do i have to do it all in the same line?
                          Thank you!
                          What would be the best way to check this?

                          1 Reply Last reply Reply Quote 0
                          • G
                            geovaneg
                            last edited by

                            Thanks for de big tip ! For my transparent mode config works fine.

                            Geovane

                            1 Reply Last reply Reply Quote 0
                            • X
                              xainx
                              last edited by

                              @bellera:

                              Tested with squid3-dev 3.3.10 pkg 2.2.1 not transparent (intercept) mode

                              I need to limit the use of Youtube at my main installation.

                              Nothing configured at Proxy server: Traffic management, so the defaults at squid.conf

                              request_body_max_size 0 KB
                              delay_pools 1
                              delay_class 1 2
                              delay_parameters 1 -1/-1 -1/-1
                              delay_initial_bucket_level 100
                              delay_access 1 allow allsrc
                              

                              I added, at Custom Options,  the following lines (Youtube serves now the videos from googlevideo.com domain):

                              # Limiting YOUTUBE at 8 * 512.000 Byte/s = 4.096.000 bit/s = 4 Mbit/s
                              delay_pools 2
                              delay_class 2 1
                              delay_parameters 2 512000/512000
                              acl YOUTUBE dstdomain .googlevideo.com
                              delay_access 2 allow YOUTUBE
                              

                              I went to www.youtube.com and searched for long videos

                              I opened many (4-5) long videos at the same time. It worked!

                              I did changes to 256000/256000 (2 Mbit/s) and it worked!

                              I reconfigured a new time with 512000/512000 (4 Mbit/s) and it worked!

                              Please see the attached image. I think bandwidth 4 Mbit/s and 2 Mbit/s is bigger because in fact I'm monitoring my VPN connection.

                              I made the testing from road warrior at home using the proxy at job. Nobody at job. :) :) :)

                              Problem

                              • squid.conf has two lines delay_pools (one from default configuration, other from my Custom Options).
                              • But it seems not to be important.
                              • Old discussion about extra delay pools, https://forum.pfsense.org/index.php?topic=41516.0

                              Hello
                              Thank you for this post!
                              I am having trouble assigning this setting for a specific range. what do you think my problem is?

                              Here is my setting

                              acl user_group_1 192.168.1.20-192.168.1.90
                              delay_pools 2
                              delay_class 2 1
                              delay_parameters 2 512000/512000
                              acl YOUTUBE dstdomain .googlevideo.com
                              delay_access 2 allow YOUTUBE
                              delay_access 2 allow user_group_1

                              1 Reply Last reply Reply Quote 0
                              • B
                                biagogni
                                last edited by

                                Excelente, sirvio para 2.4.2

                                Excellent, it works on 2.4.2

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.