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

    Memory usuage after reboot

    Scheduled Pinned Locked Moved Off-Topic & Non-Support Discussion
    33 Posts 8 Posters 2.9k 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.
    • provelsP
      provels
      last edited by

      Is it even an issue if it only goes to 18%? After all, you paid for 100% of it...
      Or are you just curious? Are you running /tmp and /var in ramdisks?
      My own is sitting at 32% of 1.5GB after 3 days, and I'm fine with that.

      Peder

      MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
      BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

      A 1 Reply Last reply Reply Quote 0
      • A
        abailey10 @provels
        last edited by

        @provels I believe 18 percent is the correct usuage, when it only uses 7 percent it seems slower all around, internet and gui. Ifs like after reboot pfsense cannot load as much of itself into ram. But if update happens it reboots and uses 18 percent again runs fast all is well. Problem is if i make changes reboots are needed which lowers the ram usage again and it seems slow

        1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          Have you been able to measure any perceived slowness?

          Try running top -aSH at the command line. What is using or not using the RAM?

          Steve

          A 1 Reply Last reply Reply Quote 0
          • A
            abailey10 @stephenw10
            last edited by

            @stephenw10 said in Memory usuage after reboot:

            top -aSH

            Also dsl reports speed test has random spikes up to 2000ms down and upload as it cant keep up clearing the queue

            last pid: 87120; load averages: 0.25, 0.19, 0.17 up 0+16:39:35 20:36:05
            181 processes: 5 running, 156 sleeping, 20 waiting

            Mem: 25M Active, 109M Inact, 224M Wired, 32M Buf, 3311M Free
            Swap: 2862M Total, 2862M Free

            PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND
            11 root 155 ki31 0K 64K CPU0 0 998:03 100.00% [idle{idle: cpu0}]
            11 root 155 ki31 0K 64K CPU3 3 997:51 100.00% [idle{idle: cpu3}]
            11 root 155 ki31 0K 64K CPU2 2 997:01 100.00% [idle{idle: cpu2}]
            11 root 155 ki31 0K 64K RUN 1 998:17 98.88% [idle{idle: cpu1}]
            18086 root 26 0 88640K 32404K piperd 2 0:02 0.88% php-fpm: pool nginx (php-fpm)
            375 root 52 0 88512K 32468K accept 0 0:02 0.20% php-fpm: pool nginx (php-fpm)
            0 root -92 - 0K 432K - 1 1:26 0.00% [kernel{em0 que}]
            0 root -92 - 0K 432K - 3 0:35 0.00% [kernel{em1 que}]
            12 root -60 - 0K 320K WAIT 0 0:31 0.00% [intr{swi4: clock (0)}]
            0 root -16 - 0K 432K swapin 1 0:30 0.00% [kernel{swapper}]
            19 root -16 - 0K 16K pftm 1 0:11 0.00% [pf purge]
            21746 root 52 20 6968K 2600K wait 0 0:06 0.00% /bin/sh /var/db/rrd/updaterrd.sh
            80767 unbound 20 0 65056K 41420K kqread 0 0:04 0.00% /usr/local/sbin/unbound -c /var/unbound/unbound.conf{unbound}
            80767 unbound 20 0 65056K 41420K kqread 1 0:04 0.00% /usr/local/sbin/unbound -c /var/unbound/unbound.conf{unbound}
            80767 unbound 20 0 65056K 41420K kqread 3 0:04 0.00% /usr/local/sbin/unbound -c /var/unbound/unbound.conf{unbound}
            80767 unbound 20 0 65056K 41420K kqread 2 0:02 0.00% /usr/local/sbin/unbound -c /var/unbound/unbound.conf{unbound}
            64649 root 20 0 6900K 2344K nanslp 3 0:02 0.00% [dpinger{dpinger}]
            85390 root 20 0 12396K 12500K select 3 0:02 0.00% /usr/local/sbin/ntpd -g -c /var/etc/ntpd.conf -p /var/run/ntpd.pid{ntpd}

            A 1 Reply Last reply Reply Quote 0
            • A
              abailey10 @abailey10
              last edited by

              @abailey10

              State table size
              0% (168/378000) Show states
              MBUF Usage
              0% (4056/1000000)
              Temperature
              30.7°C
              Load average
              0.08, 0.15, 0.16
              CPU usage
              0%
              Memory usage
              7% of 3786 MiB
              SWAP usage
              0% of 2862 MiB
              Disk usage:
              /
              2% of 51GiB - ufs
              /tmp
              0% of 248MiB - ufs in RAM
              /var
              8% of 248MiB - ufs in RAM

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

                No one else has this problem or even notice it? 50 percent drop in memory is significant when the os is loaded to ram

                GertjanG 1 Reply Last reply Reply Quote 0
                • DerelictD
                  Derelict LAYER 8 Netgate
                  last edited by

                  @abailey10 said in Memory usuage after reboot:

                  Any ideas?

                  This looks like a complete non-problem to me. The operating system and the running applications uses memory for many things. If it is there, why not use it?

                  This is what really matters:
                  SWAP usage
                  0% of 2862 MiB

                  Chattanooga, Tennessee, USA
                  A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                  DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                  Do Not Chat For Help! NO_WAN_EGRESS(TM)

                  1 Reply Last reply Reply Quote 1
                  • GertjanG
                    Gertjan @abailey10
                    last edited by Gertjan

                    @abailey10 said in Memory usuage after reboot:

                    No one else has this problem or even notice it? ....

                    What ? I missed something ?

                    Using a bare bone, retired desktop PC with : an Intel(R) Pentium(R) 4 CPU 3.20GHz - 2 CPUs: 1 package(s) x 2 hardware threads

                    (2 WAN, 3 LAN, some 20 devices on LAN and a boatload of captive portal users )

                    @abailey10 said in Memory usuage after reboot:

                    Also dsl reports speed test has random spikes up to 2000ms down and upload as it cant keep up clearing the queue

                    This one http://www.dslreports.com/speedtest ?
                    Just tested :

                    88438c89-2392-4d63-ad95-b8b98ce0dbf0-image.png

                    That's a less general discussion, and has it's own forum here.

                    @abailey10 said in Memory usuage after reboot:

                    as it cant keep up clearing the queue

                    What queue ?
                    The spikes can be removed, that's no a big issue.
                    What stays : your LAN's are probably much faster as your WAN-to-the-Net-connection.
                    So, pfSense will buffer while your uplink is being pushed to the max. Upstream signal 'converters' like cable or ADSL modems also inject there part of delays.

                    No "help me" PM's please. Use the forum, the community will thank you.
                    Edit : and where are the logs ??

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      abailey10 @Gertjan
                      last edited by

                      @Gertjan Lets stay to the point, the speed test was just to show performance drop at some point the gateway's access time spikes and the test show random high spikes happens on downloads only. The point is 18 percent memory on first install and everything works great. After rebooting pfsense it only uses 7 percent memory and the gateways have high access times and download has random spikes again.

                      And by the way this network card has two hardware queue's 1 per port.

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        abailey10 @abailey10
                        last edited by

                        @abailey10 Im using fx 4100 3.6ghz quad core , 4gb ddr3 1333 cas 9, 2 port intel pro 1000pt, network card is plugged into pcie 2.0 x16.

                        This wasnt a problem on earlier builds, but has been for the last several. As long as i never reboot after update it uses 18 percent memory again and all works great.

                        1 Reply Last reply Reply Quote 0
                        • stephenw10S
                          stephenw10 Netgate Administrator
                          last edited by

                          Mmm, I think the memory usage you are seeing there is probably not directly related to any slowness you're seeing.

                          2000ms ping spike are obviously an issue. If that's actually caused by the firewall I would expect to see a big CPU spike recorded at that time. I have seen systems present like that if they get stuck in a filter-reload loop on occasion. You would see that in the system log though.
                          If it's something else upstream it might cleared by re-connecting the WAN or rebooting your modem maybe.

                          Steve

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

                            pfsense seems to have memory issues, i tired 3 other firewalls including opensense , they all work without this issue.

                            provelsP GertjanG JeGrJ 3 Replies Last reply Reply Quote 0
                            • provelsP
                              provels @abailey10
                              last edited by

                              @abailey10 I would just use something else then.

                              Peder

                              MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
                              BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

                              1 Reply Last reply Reply Quote 0
                              • GertjanG
                                Gertjan @abailey10
                                last edited by Gertjan

                                pfSense is the factor that we all have in common : version 2.4.4-p3.
                                Believe me, it's all identical code for all of us.

                                Difference are :
                                Hardware - and thus (FreeBSD) drivers used.
                                Installed packages ...
                                An last but not least : settings.

                                Yet, you draw this conclusion :

                                @abailey10 said in Memory usuage after reboot:

                                pfsense seems to have memory issues,

                                Let say you ommitted two words :

                                ... for me

                                No "help me" PM's please. Use the forum, the community will thank you.
                                Edit : and where are the logs ??

                                1 Reply Last reply Reply Quote 0
                                • JeGrJ
                                  JeGr LAYER 8 Moderator @abailey10
                                  last edited by

                                  @abailey10 said in Memory usuage after reboot:

                                  pfsense seems to have memory issues, i tired 3 other firewalls including opensense , they all work without this issue.

                                  Yeah... right... not. Besides every freaking web service out there being lower on memory after a restart, your conclusions with 1 (your) testcase is simple lopsided. If the software stack itself had memory problems that would have rang alarm bells all over the place for a multitude of people. Don't you think? So it's down to the list @Gertjan wrote: HW, installed packages and mostly your configuration (base & packages). Simple as that.

                                  Also if you want to get to the bottom of your usage, try top with shift+m to sort for processes that have the most memory allocated or do some ps axwww etc. output before and after your "too much memory in use" condition to check who the culprit eating your RAM may be.

                                  But with years almost two decades of web application hosting knowledge I have to say that everything that either doesn't run into a memory leak draining memory until swap (would be seen eating your memory until 100% in use) or is a wrong configured host/services that simply allocates far too much memory is simply normal. Anything being it the OS, webserver, services etc. may reserve some memory if it is readily available. So pages like https://www.linuxatemyram.com/ don't come from nowhere. We always have people asking where their RAM went and always have to make them acknowledge, that it isn't something bad. OK we're using BSD here, but never mind that :)

                                  Don't forget to upvote 👍 those who kindly offered their time and brainpower to help you!

                                  If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

                                  1 Reply Last reply Reply Quote 0
                                  • kiokomanK
                                    kiokoman LAYER 8
                                    last edited by

                                    watching the top the first thing that come to my mind... could be related to unbound that restart with dhcp registration if you see mem go up and down ?

                                    ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                                    Please do not use chat/PM to ask for help
                                    we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
                                    Don't forget to Upvote with the 👍 button for any post you find to be helpful.

                                    1 Reply Last reply Reply Quote 0
                                    • JeGrJ
                                      JeGr LAYER 8 Moderator
                                      last edited by

                                      Perhaps. As we don't have a complete psoutput and don't know which packets are in play, something like pfB-NG could very well add a big dent into unbounds RAM usage. But that's all speculation until a much more in depth look can be done with more intel about the system and installation as well as additional packages.

                                      Don't forget to upvote 👍 those who kindly offered their time and brainpower to help you!

                                      If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

                                      1 Reply Last reply Reply Quote 0
                                      • provelsP
                                        provels
                                        last edited by

                                        From my understanding, he's complaining that it's not using enough RAM. Says it's slow after reboot until the system gets cached. Whatever, I think it's a non-issue. DSLReports speedtest issues can be anything from ISP to modem.

                                        Peder

                                        MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
                                        BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

                                        1 Reply Last reply Reply Quote 0
                                        • stephenw10S
                                          stephenw10 Netgate Administrator
                                          last edited by

                                          Yeah the memory usage might possibly be a related symptom but it's not a cause here.

                                          It's almost certainly CPU usage causing those ping spikes. Check the system log like I suggested earlier. If some process is triggering it you should be able to see that firing when you see the ping issues.

                                          Steve

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

                                            I thought pfsense ran from ramdisk once loaded from ssd. If so then why would 50 percent lower memory usage not be a red flag. Its not cpu spikes as it has never been past 20 percent during high load and gui with monitors usually never see more than 1 to 6 percent. This could be hardware related, except if i get an update and it reboots memory usage will be 18 percent which is normal not 7 percent. My internet is 100 down 10 up, no way its stress a quad core at 3.8ghz without power savings of any kind or turbo , this cpu is not power or heat throttling. Its like pfsense cant load all of itself into the ramdisk after reboot

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