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

    Squid proxy hit rate

    Scheduled Pinned Locked Moved Cache/Proxy
    4 Posts 2 Posters 5.4k 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.
    • B
      Balanga
      last edited by

      Are there any reports generated which show the hit rate for the squid proxy server I have installed?

      And are there any tips on increasing the hit rate? …Presumably increasing cache size... I have 20GB. How can I tell if increasing this will be effective?

      1 Reply Last reply Reply Quote 0
      • KOMK
        KOM
        last edited by

        Shell in and run:

        squidclient -h IP_Address -p Port mgr:info

        where IP_Address is your LAN IP address that squid listens on, and Port is the port (usually 3128 unless you changed it)

        eg. squidclient -h 10.10.0.1 -p 3128 mgr:info

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

          Thanks for the pointer… Could you just explain what the last parameter means and what I should expect after running this command?

          When I ran it I got no response - didn't know what to expect...

          1 Reply Last reply Reply Quote 0
          • KOMK
            KOM
            last edited by

            If I remember, you have to add the IP address that squid listens on to the External cache Managers field in Services - Squid Proxy Server - Local cache.  Your output should look like this:

            [2.2.5-RELEASE][admin@pfsense.kominc.local]/root: squidclient -h 10.10.4.1 -p 3128 mgr:info
            Sending HTTP request ... done.
            HTTP/1.1 200 OK
            Server: squid
            Mime-Version: 1.0
            Date: Wed, 10 Feb 2016 14:49:20 GMT
            Content-Type: text/plain
            Expires: Wed, 10 Feb 2016 14:49:20 GMT
            Last-Modified: Wed, 10 Feb 2016 14:49:20 GMT
            X-Cache: MISS from localhost
            X-Cache-Lookup: MISS from localhost:3128
            Connection: close
            
            Squid Object Cache: Version 3.4.10
            Build Info:
            Start Time:     Fri, 25 Dec 2015 17:55:34 GMT
            Current Time:   Wed, 10 Feb 2016 14:49:20 GMT
            Connection information for squid:
                    Number of clients accessing cache:      58
                    Number of HTTP requests received:       9997622
                    Number of ICP messages received:        0
                    Number of ICP messages sent:    0
                    Number of queued ICP replies:   0
                    Number of HTCP messages received:       0
                    Number of HTCP messages sent:   0
                    Request failure ratio:   0.00
                    Average HTTP requests per minute since start:   148.1
                    Average ICP messages per minute since start:    0.0
                    Select loop called: 261284164 times, 15.499 ms avg
            Cache information for squid:
                    Hits as % of all requests:      5min: 1.2%, 60min: 3.7%
                    Hits as % of bytes sent:        5min: 2.0%, 60min: 0.9%
                    Memory hits as % of hit requests:       5min: 9.1%, 60min: 5.6%
                    Disk hits as % of hit requests: 5min: 9.1%, 60min: 6.5%
                    Storage Swap size:      9437124 KB
                    Storage Swap capacity:  90.0% used, 10.0% free
                    Storage Mem size:       8100 KB
                    Storage Mem capacity:   98.9% used,  1.1% free
                    Mean Object Size:       34.64 KB
                    Requests given to unlinkd:      0
            Median Service Times (seconds)  5 min    60 min:
                    HTTP Requests (All):   0.06640  0.06640
                    Cache Misses:          0.06640  0.06640
                    Cache Hits:            0.00000  0.00091
                    Near Hits:             0.00179  0.01164
                    Not-Modified Replies:  0.00000  0.00000
                    DNS Lookups:           0.03223  0.03374
                    ICP Queries:           0.00000  0.00000
            Resource usage for squid:
                    UP Time:        4049625.975 seconds
                    CPU Time:       17684.284 seconds
                    CPU Usage:      0.44%
                    CPU Usage, 5 minute avg:        0.94%
                    CPU Usage, 60 minute avg:       0.80%
                    Maximum Resident Size: 478176 KB
                    Page faults with physical i/o: 168
            Memory accounted for:
                    Total accounted:        52310 KB
                    memPoolAlloc calls: 1936117391
                    memPoolFree calls:  1943865739
            File descriptor usage for squid:
                    Maximum number of file descriptors:   57960
                    Largest file desc currently in use:    267
                    Number of file desc currently in use:  135
                    Files queued for open:                   0
                    Available number of file descriptors: 57825
                    Reserved number of file descriptors:   100
                    Store Disk files open:                   0
            Internal Data Structures:
                    272539 StoreEntries
                      1887 StoreEntries with MemObjects
                      1831 Hot Object Cache Items
                    272431 on-disk objects
            
            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.