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

    Why swap memory is higher than real entered number?

    Scheduled Pinned Locked Moved General pfSense Questions
    13 Posts 3 Posters 977 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.
    • emammadovE
      emammadov
      last edited by emammadov

      Yes, I am using 2 disk with mirroring in ZFS. I see it in Dashboard. I

      the result of "swapinfo" command

      Device 512-blocks Used Avail Capacity
      /dev/da0p2 8388608 0 8388608 0%
      /dev/da1p2 8388608 0 8388608 0%
      Total 16777216 0 16777216 0%

      ====================================================

      the result of "top" command:

      last pid: 66533; load averages: 0.12, 0.14, 0.14 up 69+02:24:42 22:40:19
      51 processes: 2 running, 49 sleeping

      Mem: 164M Active, 2375M Inact, 25M Laundry, 4749M Wired, 192K Buf, 593M Free
      ARC: 2178M Total, 60M MFU, 1497M MRU, 3024K Anon, 55M Header, 563M Other
      1173M Compressed, 8913M Uncompressed, 7.60:1 Ratio
      Swap: 8192M Total, 8192M Free

      PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
      38331 root 1 24 0 293M 44984K piperd 1 2:07 0.88% php-fpm
      33060 root 29 20 0 367M 246M nanslp 3 39:50 0.20% ntopng
      31658 root 1 20 0 12736K 1876K bpf 2 35:05 0.00% filterlog

      Elvin

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

        Then that's why. You have swap on each disk, total is double.

        It doesn't mirror swap, no need to do that.

        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
        • emammadovE
          emammadov
          last edited by

          Is it recommended to mirror swap or leave as double?

          Elvin

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

            There is zero reason to mirror swap. It is not important data. It is temporary and volatile. Mirroring would slow swap down even more than it already is. Leave it as separate swap slices and keep it double.

            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
            • emammadovE
              emammadov
              last edited by

              Thank you very much for your clear answer.

              Elvin

              1 Reply Last reply Reply Quote 0
              • emammadovE
                emammadov
                last edited by

                I looked at carefully. Dashboard shows 4GB of swap memory, while top and swapinfo commands show 8GB of swap memory.

                0_1539239838008_1.jpg
                1_1539239838008_2.jpg
                2_1539239838008_3.jpg

                Elvin

                1 Reply Last reply Reply Quote 0
                • R
                  RichardBud
                  last edited by

                  That's very odd. They should be both showing 4GB, no?

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

                    Are you on 2.4.4? Until 2.4.4, it did not count all swap partitions on the dashboard widget -- https://redmine.pfsense.org/issues/8587

                    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
                    • emammadovE
                      emammadov
                      last edited by emammadov

                      I am using 2.4.3p1 version. It has been fixed in 2.4.4 release?

                      Elvin

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

                        Yes, it has been fixed on 2.4.4. Follow the link I put above and you'll see.

                        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
                        • emammadovE
                          emammadov
                          last edited by

                          Thank you very much.

                          Elvin

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