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

    Pfsense in a high traffic environment

    Scheduled Pinned Locked Moved General pfSense Questions
    8 Posts 4 Posters 21.6k 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.
    • A
      alanon
      last edited by

      I work for a company that is an Internet search engine.  We currently have 4 pfsense (running on dell PE1750's) and a Watchguard firewall.  We load balance our crawlers across the firewalls, not only for performance reasons but also do have them appear to come from different IP's, we have multiple IP blocks.

      What I am wondering is are there any tweaks for this type of traffic, each firewall averages in the 20-30Mb range constantly, with spikes to 40Mb (download traffic).  The config I use is just the default configuration, the only additional rule is to allow pings from our monitoring solution.

      Any suggestions would be greatly appreciated.

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

        Are the servers stressed in any way?
        Just a wild guess.
        System -> Advanced functions
        Firewall Optimization Options
        @http://www.pfsense.org/index.php?option=com_content&task=view&id=40&Itemid=43:

        State table optimization options - pf offers four options for state table optimization.

        * Normal - the default algorithm
            * High latency - Useful for high latency links, such as satellite connections. Expires idle connections later than normal.
            * Aggressive - Expires idle connections more quickly. More efficient use of hardware resources, but can drop legitimate connections.
            * Conservative - Tries to avoid dropping legitimate connections at the expense of increased memory usage and CPU utilization.

        http://www.pfsense.org/index.php?option=com_content&task=view&id=52&Itemid=49

        /Perry
        doc.pfsense.org

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

          As an individual firewall approaches 40Mb we seem to get more timeouts.  We have a full gig to the Internet so bandwidth is not an issue.  The CPU and RAM usage don't seem to be the limiting factor, so my guess is either the NIC's (integrated Broadcom Gigabit) or a setting in pfsense.

          1 Reply Last reply Reply Quote 0
          • ?
            Guest
            last edited by

            You may also want to check your firewall max states and make sure you aren't close to exhausting them.  If so, raise them.  System -> Advanced.

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

              I just looked at the state table and one of them was at over 17,000, the two that I would expect to be the highest had no value listed.    Newbie question:  Can having the state table value too low severely impact performance?  With that firewall at 17,000 and considering there are two firewalls that easily to 5-7 times the traffic of that one, I am assuming that I may need to increase the table size from default (10K) to maybe 100K?  (we have 4Gb of RAM in these firewalls.)

              1 Reply Last reply Reply Quote 0
              • ?
                Guest
                last edited by

                Yes, a low max states will absolutely impact performance.  You have plenty of memory so I would encourage you to increase your max states.  Each FW state will utilize approximately 1-3k of memory so you have plenty of space to expand.

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

                  When you run out of states you can't open any more connections, so yes, it will cause connection failures.  With 4 GB RAM, I'd up it to at least a million.

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

                    Thanks, I appreciate all of the feedback.  I upped the value on all of them.  One of them went from 18K up to 32K pretty quickly.  I am checking with the developers to see if this eased the timeout problem.

                    Thanks again.

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