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

    Number of states over 9000 for two computers

    Scheduled Pinned Locked Moved General pfSense Questions
    14 Posts 5 Posters 3.7k 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.
    • T
      tubaguy50035
      last edited by

      The internet is extremely slow and latency is extremely high, looked at the pfsense box and it has around 9600 states.  This seems like it is all from my room mate's computer.  I know he torrents a lot, but he has the speed capped.  Anybody know what could be causing this?  Seems like all of the states say MULTIPLE:MULTIPLE, ESTABLISHED:ESTABLISHED, or FIN_WAIT_2:ESTABLISHED.

      1 Reply Last reply Reply Quote 0
      • T
        tubaguy50035
        last edited by

        Also, what's a normal number of states?

        1 Reply Last reply Reply Quote 0
        • E
          Efonnes
          last edited by

          If he does not have it set up to limit the number of active torrents and has a high limit set for the number of connections, it can use a lot of connections even if a bandwidth limit is set.

          1 Reply Last reply Reply Quote 0
          • T
            tubaguy50035
            last edited by

            Is there a way to limit the number of states he can have?

            1 Reply Last reply Reply Quote 0
            • J
              jasonlitka
              last edited by

              You could create a firewall rule for him and fill in some of the state-related fields under "Advanced Options".

              Just as an FYI, I checked my main pfSense box at work, and, hitting refresh every few seconds for a few minutes, I have between 8000-12000 states for around 100 computers.  About 20% of those are technically internet-enabled but have basically zero web usage, and, of the remaining, about 10% of the users use the vast majority of my bandwidth.

              I can break anything.

              1 Reply Last reply Reply Quote 0
              • T
                tubaguy50035
                last edited by

                What do I use as the rule?  Under lan or wan?
                Pass or block or reject?

                I found the limit number of state entries per host.  Just not sure what to do with it.

                1 Reply Last reply Reply Quote 0
                • D
                  dreamslacker
                  last edited by

                  @tubaguy50035:

                  Is there a way to limit the number of states he can have?

                  You can raise the maximum number of states (default 10,000?) in pfsense instead.  I easily have 11k to 12k states off my machine on torrenting 2 or 3 files at a time and there is no issue as long as the connection bandwidth isn't saturated.  If raising the number of states doesn't work, then he evidently isn't limiting the bandwidth usage enough or he hasn't gotten around to applying the rate limits to uTP traffic as well.

                  1 Reply Last reply Reply Quote 0
                  • T
                    tubaguy50035
                    last edited by

                    how do I do that?

                    1 Reply Last reply Reply Quote 0
                    • D
                      dreamslacker
                      last edited by

                      System ->  Advanced -> Firewall Maximum States

                      By default on 1.2.3, it should be 10,000.  You can raise it to just about any high figure if you want.  The memory is only used up when states are generated anyway.  I have mine at 500,000 on a rig with 1GB of ram (but I don't run any packages).
                      The maximum I've hit with 2 active downloading machines is about 20,000 states.  If your room mate is the only other client on the LAN, I reckon 100,000 is enough.  The OS networking stack should crap out or the disk go into overload long before he can touch that figure.

                      1 Reply Last reply Reply Quote 0
                      • jimpJ
                        jimp Rebel Alliance Developer Netgate
                        last edited by

                        Each state is 1K of RAM, so 500,000 states is 500MB.

                        The disk wouldn't matter to network throughput, just RAM/CPU :-)

                        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                        Need help fast? Netgate Global Support!

                        Do not Chat/PM for help!

                        1 Reply Last reply Reply Quote 0
                        • D
                          dreamslacker
                          last edited by

                          @jimp:

                          The disk wouldn't matter to network throughput, just RAM/CPU :-)

                          I meant the harddrive on the client.  Extreme torrenting tends to cause a harddisk overload error (harddrive thrashing doesn't keep up with the amount of small I/Os coming it's way) on the torrent client.

                          1 Reply Last reply Reply Quote 0
                          • D
                            dreamslacker
                            last edited by

                            Alright, I just proved myself wrong.  I managed >120,000 states with only 1 machine torrenting.  Then again, I do have 8GB of ram on the torrent machine and saturating 1 full core on my E8400 for uTorrent.

                            1 Reply Last reply Reply Quote 0
                            • T
                              tubaguy50035
                              last edited by

                              Wow.  I also discovered that if I turn of UPnP, the connections drop a lot.

                              1 Reply Last reply Reply Quote 0
                              • D
                                dreamslacker
                                last edited by

                                @tubaguy50035:

                                Wow.  I also discovered that if I turn of UPnP, the connections drop a lot.

                                Yes.  uPNP is an easy way to punch through the NAT for torrenting if you don't have access to the router or don't know how to configure port forwarding for torrenting.

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