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

    Squid settings question

    Scheduled Pinned Locked Moved pfSense Packages
    5 Posts 3 Posters 2.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.
    • E Offline
      Ecnerwal
      last edited by

      I just noticed (8 months into pfSense use) that low and high watermark on the Cache Management page says not quite what I expect them to say (or thought they said:) I have bolded the worrisome word.

      Low-water-mark in %
      Cache replacement begins when the swap usage is above the low-low-water mark and attempts to maintain utilisation near the low-water-mark.

      High-water-mark in %
      As swap utilisation gets close to the high-water-mark object eviction becomes more aggressive.

      I thought I was adjusting the use/replacement scheme of cache space. Either the page text is wrong or this is a very different setting than I thought it was - I don't really want swap getting used at all.

      pfSense on i5 3470/DQ77MK/16GB/500GB

      1 Reply Last reply Reply Quote 0
      • M Offline
        markn62
        last edited by

        How would cache replacement occur without swapping?  Out with the old, in with the new based on watermark settings.  I don't understand your concern with the word SWAP.  You can swap to ramdrive, traditional drive, thumbdrive, but it's still a swap.

        1 Reply Last reply Reply Quote 0
        • E Offline
          Ecnerwal
          last edited by

          swap space has a very particular meaning in computing. It is the disk space larger than RAM onto which portions of RAM are placed when RAM capacity is exceeded. Given the relative speeds of disk and RAM, when a system starts using a significant amount of swap space, performance plummets. An ideally-tuned router will use all of it's RAM, but no swap. You will find SWAP usage reported on your dashboard (unless running embedded with no SWAP at all, in which case  you're probably not going to be running squid, either.)

          As such, if the squid cache management page is using the term swap correctly, it's tuning for disaster. I hope it's not using the term correctly, but if not, it's a very strange error to make, given that the rest of the page uses cache, appropriately, and swap does have this very specific meaning (that you, and perhaps whoever chose the word there are unaware of.) There are some behaviors I have seen recently that do make me wonder if swap IS what is actually meant, which is why I'm asking the question.

          In addition, there is no "swapping" of files in cache management - old items are discarded, not swapped out.

          pfSense on i5 3470/DQ77MK/16GB/500GB

          1 Reply Last reply Reply Quote 0
          • K Offline
            kejianshi
            last edited by

            Its much easier just to allocate a conservative maximum to both RAM cache and Disk Cache.  If you do that, you don't need to worry yourself with the definition of "swap".

            1 Reply Last reply Reply Quote 0
            • M Offline
              markn62
              last edited by

              I see your point Ecnerwal.  I would hope the author simply misused the word "swap" for "cache".  Your right, there generally isn't any swapping going on in a cache.  Operates more like a FIFO, in the case of Squid, a conditional or rules based FIFO.  I don't swap anything to my SSD either, use RAM for all I can except the occasional logging on a 4 hr interval.

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