Navigation

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

    The local Disk cache only use 10M, is that normal and my cache working well?

    Cache/Proxy
    3
    4
    501
    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.
    • bluegrass-168
      bluegrass-168 last edited by bluegrass-168

      Hi ,

      I am using Squid Proxy and Enable the local Cache + SSL Inspection to try improving the slow ADSL bandwidth performance.

      My cache setting is as below:

      6e34cb86-daaf-4d24-b994-e85396d7a2ac-image.png

      fc61d05b-a698-46fe-a633-f896adaf7743-image.png

      Cache information from squid:

      Hits as % of all requests:	5min: 5.1%, 60min: 9.9%
      Hits as % of bytes sent:	5min: 4.6%, 60min: 10.2%
      Memory hits as % of hit requests:	5min: 7.9%, 60min: 2.0%
      Disk hits as % of hit requests:	5min: 53.9%, 60min: 57.5%
      Storage Swap size:	602908 KB
      Storage Swap capacity:	 5.9% used, 94.1% free
      Storage Mem size:	102300 KB
      Storage Mem capacity:	 9.8% used, 90.2% free
      Mean Object Size:	28.12 KB
      

      The Custom refresh_patterns configured as:

      refresh_pattern ^ftp: 1440 20% 10080

      refresh_pattern ^gopher: 1440 0% 1440

      refresh_pattern -i .(gif|png|jpg|jpeg|ico)$ 10080 90% 43200 override-expire ignore-no-cache ignore-no-store ignore-private

      refresh_pattern -i .(iso|avi|wav|mp3|mp4|mpeg|swf|flv|x-flv)$ 43200 90% 432000 override-expire ignore-no-cache ignore-no-store ignore-private

      refresh_pattern -i .(deb|rpm|exe|zip|tar|tgz|ram|rar|bin|ppt|doc|tiff)$ 10080 90% 43200 override-expire ignore-no-cache ignore-no-store ignore-private

      refresh_pattern -i .index.(html|htm)$ 0 40% 10080

      refresh_pattern -i .(html|htm|css|js)$ 1440 40% 40320

      refresh_pattern . 0 40% 40320

      However, I see my /var/cache still using only 10M for this case, it that normal?

      8571b110-6d2c-496d-9513-4b71e95f9ad2-image.png

      Gertjan 1 Reply Last reply Reply Quote 0
      • Gertjan
        Gertjan @bluegrass-168 last edited by Gertjan

        @bluegrass-168

        You asked for :

        b8b718c6-1915-4623-81a5-5b378099991e-image.png

        That's 10Gto me.

        @bluegrass-168 said in The local Disk cache only use 10M, is that normal and my cache working well?:

        However, I see my /var/cache still using only 10M for this case, it that normal?

        Don't use the image as an info source.
        It's a nice GUI image, and doesn't show your /var/squid/cache/ content.

        Do the real-man thing : go console (or the modern-man thing : fire up a sftp (like WINscp sp yo can browse the pfSense file system))

        Btw : your system has (only) 23G ... what disk are you using ?

        Also : you will discover something : most sites (== pages) you visit use branded file names, that is, every time you visit the page, it has another file name, another creation date and of course a different content. So, the file you cache will nearly never be the one you can re use again on a later visit.
        Caching, IMHO, was a good thing back in the plain http web site days. These are over.

        If this :

        Hits as % of all requests:	5min: 5.1%, 60min: 9.9%
        Hits as % of bytes sent:	5min: 4.6%, 60min: 10.2%
        

        is what I think it is, that's actually quiet good 👍
        Again : IMHO.

        No "help me" PM's please. Use the forum.

        bluegrass-168 1 Reply Last reply Reply Quote 1
        • bluegrass-168
          bluegrass-168 @Gertjan last edited by

          @gertjan

          Ar....haha

          The local cache is located at
          /var/squid/cache/
          but not
          /var/cache

          I know the reason now.

          Btw : your system has (only) 23G ... what disk are you using ?

          I install the Pfsense on my Synology as a VM. That is crazy, I know. haha. I just want the Proxy feature, I think still good?

          BTW, Do you manipulate on "refresh_pattern" as well?
          I also need some helps here.

          Actually, I want to cache every thing as I can.
          Should I just keep below and remove all the other patterns?

          refresh_pattern . 1440 20% 14400

          A 1 Reply Last reply Reply Quote 0
          • A
            aGeekhere @bluegrass-168 last edited by

            @bluegrass-168 use https://github.com/mmd123/squid-cache-dynamic_refresh-list for refresh_pattern (note you can always submit pull requests to improve the list).

            "Actually, I want to cache every thing as I can."
            In order to cache https you need to use SSL Man In the Middle Filtering

            However you do not want to mitm everything as it breaks way too many things. So use
            Custom Options (SSL/MITM)

            than add something like this

            acl step1 at_step SslBump1
            acl monitoredSites ssl::server_name "/home/bumpsites.txt"
            ssl_bump bump monitoredSites
            ssl_bump peek step1
            ssl_bump splice all 
            
            

            and at the file location /home/bumpsites.tx add your list of sites you want to decrypt to cache.
            Here is a list that i made (NOTE: i have not tested all domains, so if some have issues remove them, eg things like ubisoft.com)
            bumpsites.txt

            What i did was i went to winget https://github.com/microsoft/winget-pkgs and got a list of the download domains.

            This should also cache steam and epic games.

            Good luck

            Never Fear, A Geek is Here!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post