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

    Memory usage has doubled from 2.7.0 to 2.7.1RC

    Scheduled Pinned Locked Moved General pfSense Questions
    11 Posts 6 Posters 1.2k 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.
    • V
      vizi0n
      last edited by vizi0n

      Hello pfSensers !

      I have upgraded las night to 2.7.1RC and I have noticed that my memory usage has "dramatically" increased from 1.4G to 2.8G and now the new floor seems to be at 2.6G

      I am just wondering if this js normal ?

      1e28f3f0-858a-4b3f-90c2-b8080debb79c-image.jpeg

      V 1 Reply Last reply Reply Quote 0
      • V
        vizi0n @vizi0n
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • V
          vizi0n
          last edited by

          Here is the log from the upgrade before the device rebooted :

          Installed packages to be REMOVED:
          	devcpu-data-amd: 20230424
          	devcpu-data-intel: 20230512
          	nut: 2.8.0_23
          	pfSense-rc: 2.7.0
          
          New packages to be INSTALLED:
          	boost-libs: 1.83.0 [pfSense]
          	cpu-microcode-amd: 20230808 [pfSense]
          	cpu-microcode-intel: 20230808 [pfSense]
          	cpu-microcode-rc: 1.0 [pfSense]
          	dhcpcd: 10.0.3 [pfSense]
          	dhcpleases6: 0.1_3 [pfSense]
          	kea: 2.4.0_1 [pfSense]
          	log4cplus: 2.1.0 [pfSense]
          	nut-devel: 2023.10.07_1 [pfSense]
          	pfSense-composer-deps: 0.1 [pfSense]
          
          Installed packages to be UPGRADED:
          	bind-tools: 9.18.14 -> 9.18.19 [pfSense]
          	brotli: 1.0.9,1 -> 1.1.0,1 [pfSense]
          	ca_root_nss: 3.89.1 -> 3.93_2 [pfSense]
          	curl: 8.1.0 -> 8.4.0 [pfSense]
          	cyrus-sasl: 2.1.28 -> 2.1.28_1 [pfSense]
          	dbus: 1.14.6,1 -> 1.14.10,1 [pfSense]
          	filterlog: 0.1_9 -> 0.1_10 [pfSense]
          	freeipmi: 1.6.10 -> 1.6.11 [pfSense]
          	freetype2: 2.12.1_2 -> 2.13.1 [pfSense]
          	gettext-runtime: 0.21.1 -> 0.22_1 [pfSense]
          	glib: 2.76.2,2 -> 2.78.0,2 [pfSense]
          	gmp: 6.2.1 -> 6.3.0 [pfSense]
          	hostapd: 2.10_5 -> 2.10_8 [pfSense]
          	icu: 73.1,1 -> 73.2,1 [pfSense]
          	isc-dhcp44-relay: 4.4.3P1 -> 4.4.3P1_3 [pfSense]
          	isc-dhcp44-server: 4.4.3P1 -> 4.4.3P1_3 [pfSense]
          	jpeg-turbo: 2.1.5.1 -> 3.0.0 [pfSense]
          	jq: 1.6 -> 1.7_1 [pfSense]
          	json-c: 0.16 -> 0.17 [pfSense]
          	libdeflate: 1.18 -> 1.19 [pfSense]
          	libedit: 3.1.20221030,1 -> 3.1.20230828,1 [pfSense]
          	libgcrypt: 1.9.4_1 -> 1.10.2 [pfSense]
          	libgd: 2.3.3_5,1 -> 2.3.3_8,1 [pfSense]
          	libmaxminddb: 1.7.1 -> 1.7.1_1 [pfSense]
          	libnghttp2: 1.52.0 -> 1.57.0 [pfSense]
          	libssh2: 1.10.0_1,3 -> 1.11.0_1,3 [pfSense]
          	libuv: 1.45.0 -> 1.46.0 [pfSense]
          	libxml2: 2.10.4 -> 2.10.4_1 [pfSense]
          	lighttpd: 1.4.70 -> 1.4.72 [pfSense]
          	links: 2.29,1 -> 2.29_2,1 [pfSense]
          	lua-resty-core: 0.1.26 -> 0.1.27 [pfSense]
          	lua54: 5.4.4 -> 5.4.6 [pfSense]
          	luajit-openresty: 2.1.20230410 -> 2.1.20230911_1 [pfSense]
          	miniupnpd: 2.3.3,1 -> 2.3.3_1,1 [pfSense]
          	mobile-broadband-provider-info: 20221107 -> 20230416 [pfSense]
          	net-snmp: 5.9.1_3,1 -> 5.9.1_4,1 [pfSense]
          	nettle: 3.8.1 -> 3.9.1 [pfSense]
          	nginx: 1.24.0_6,3 -> 1.24.0_12,3 [pfSense]
          	ntp: 4.2.8p15_5 -> 4.2.8p17_1 [pfSense]
          	openldap26-client: 2.6.4 -> 2.6.6 [pfSense]
          	openvpn: 2.6.4 -> 2.6.6 [pfSense]
          	pcsc-lite: 1.9.9,2 -> 2.0.0,2 [pfSense]
          	perl5: 5.32.1_3 -> 5.34.1_3 [pfSense]
          	pfSense: 2.7.0 -> 2.7.1.r.20231107.1622 [pfSense]
          	pfSense-base: 2.7.0 -> 2.7.1.r.20231107.1622 [pfSense-core]
          	pfSense-boot: 2.7.0 -> 2.7.1.r.20231107.1622 [pfSense-core]
          	pfSense-default-config-serial: 2.7.0 -> 2.7.1.r.20231107.1622 [pfSense]
          	pfSense-kernel-pfSense: 2.7.0 -> 2.7.1.r.20231107.1622 [pfSense-core]
          	pfSense-pkg-nut: 2.8.0_2 -> 2.8.1 [pfSense]
          	pfSense-repo: 2.7.0 -> 2.7.1.r.20231107.1622 [pfSense]
          	pftop: 0.8_2 -> 0.8_4 [pfSense]
          	php82: 8.2.6 -> 8.2.11 [pfSense]
          	php82-bcmath: 8.2.6 -> 8.2.11 [pfSense]
          	php82-bz2: 8.2.6 -> 8.2.11 [pfSense]
          	php82-ctype: 8.2.6 -> 8.2.11 [pfSense]
          	php82-curl: 8.2.6 -> 8.2.11 [pfSense]
          	php82-dom: 8.2.6 -> 8.2.11 [pfSense]
          	php82-filter: 8.2.6 -> 8.2.11 [pfSense]
          	php82-ftp: 8.2.6 -> 8.2.11 [pfSense]
          	php82-gettext: 8.2.6 -> 8.2.11 [pfSense]
          	php82-gmp: 8.2.6 -> 8.2.11 [pfSense]
          	php82-intl: 8.2.6 -> 8.2.11 [pfSense]
          	php82-ldap: 8.2.6 -> 8.2.11 [pfSense]
          	php82-mbstring: 8.2.6 -> 8.2.11 [pfSense]
          	php82-opcache: 8.2.6 -> 8.2.11 [pfSense]
          	php82-openssl_x509_crl: 1.3_2 -> 1.3_3 [pfSense]
          	php82-pcntl: 8.2.6 -> 8.2.11 [pfSense]
          	php82-pdo: 8.2.6 -> 8.2.11 [pfSense]
          	php82-pdo_sqlite: 8.2.6 -> 8.2.11 [pfSense]
          	php82-pear-Mail: 1.4.1,1 -> 1.5.1,1 [pfSense]
          	php82-posix: 8.2.6 -> 8.2.11 [pfSense]
          	php82-readline: 8.2.6 -> 8.2.11 [pfSense]
          	php82-session: 8.2.6 -> 8.2.11 [pfSense]
          	php82-shmop: 8.2.6 -> 8.2.11 [pfSense]
          	php82-simplexml: 8.2.6 -> 8.2.11 [pfSense]
          	php82-sockets: 8.2.6 -> 8.2.11 [pfSense]
          	php82-sqlite3: 8.2.6 -> 8.2.11 [pfSense]
          	php82-sysvmsg: 8.2.6 -> 8.2.11 [pfSense]
          	php82-sysvsem: 8.2.6 -> 8.2.11 [pfSense]
          	php82-sysvshm: 8.2.6 -> 8.2.11 [pfSense]
          	php82-tokenizer: 8.2.6 -> 8.2.11 [pfSense]
          	php82-xml: 8.2.6 -> 8.2.11 [pfSense]
          	php82-xmlreader: 8.2.6 -> 8.2.11 [pfSense]
          	php82-xmlwriter: 8.2.6 -> 8.2.11 [pfSense]
          	php82-zlib: 8.2.6 -> 8.2.11 [pfSense]
          	png: 1.6.39 -> 1.6.40 [pfSense]
          	py311-maxminddb: 2.3.0 -> 2.4.0 [pfSense]
          	py311-setuptools: 63.1.0 -> 63.1.0_1 [pfSense]
          	py311-sqlite3: 3.11.3_8 -> 3.11.6_8 [pfSense]
          	python311: 3.11.3 -> 3.11.6 [pfSense]
          	smartmontools: 7.3 -> 7.4 [pfSense]
          	sqlite3: 3.41.2,1 -> 3.43.1,1 [pfSense]
          	strongswan: 5.9.10_2 -> 5.9.11_2 [pfSense]
          	tiff: 4.4.0_1 -> 4.4.0_2 [pfSense]
          	unbound: 1.17.1_3 -> 1.18.0 [pfSense]
          	vnstat: 2.10 -> 2.11_1 [pfSense]
          	voucher: 0.1_2 -> 0.1_3 [pfSense]
          	webp: 1.3.0 -> 1.3.2 [pfSense]
          	wpa_supplicant: 2.10_6 -> 2.10_9 [pfSense]
          	xxhash: 0.8.1_2 -> 0.8.2 [pfSense]
          	zstd: 1.5.4_2 -> 1.5.5 [pfSense]
          
          Installed packages to be REINSTALLED:
          	rrdtool-1.8.0_2 [pfSense] (direct dependency changed: perl5)
          
          Number of packages to be removed: 4
          Number of packages to be installed: 10
          Number of packages to be upgraded: 101
          Number of packages to be reinstalled: 1
          
          The process will require 370 MiB more space.
          >>> Downloading pkg... 
          
          No packages are required to be fetched.
          Integrity check was successful.
          >>> Upgrading pfSense-boot...>>> Unmounting /boot/efi... 
          
          N 1 Reply Last reply Reply Quote 0
          • N
            nimrod @vizi0n
            last edited by

            I think this was discussed before. All release candidates are running kernel in debugging mode which takes more CPU and memory. When release goes from RC to full, kernel debugging is disabled and you get your memory back.

            @stephenw10 - Correct me if im wrong.

            V 1 Reply Last reply Reply Quote 0
            • V
              vizi0n @nimrod
              last edited by

              @nimrod aaah that would make sense indeed. I just « needed » the new NUT package to fix my UPS monitoring. I’ll live with it and it was in my plans to upgrade the RAM eventually anyway. I was just curious and wanted to raise that in case it wasn’t normal.

              Thanks

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

                I don't think that's the case with 2.7.1-RC. What does happen though is a lot of memory is used during the upgrade. It will eventually be freed or freed immediately if something else needs it. Or if you reboot I would expect it to go back to similar levels to 2.7.1.

                Steve

                V 1 Reply Last reply Reply Quote 1
                • V
                  vizi0n @stephenw10
                  last edited by

                  @stephenw10

                  I have upgraded again to the latest 2.7.1RC from today. Mem usage dropped, then I have rebooted again and now it is even lower than before. Thanks for the advice

                  7d69ce1c-6bed-4c9f-97d3-59e741cef554-image.jpeg

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

                    That is pretty common if you are using ZFS.

                    The details about what is happening there are covered in the docs, particularly this point:

                    https://docs.netgate.com/pfsense/en/latest/hardware/memory.html#zfs-disk-activity-increases-memory-usage

                    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!

                    Bob.DigB V 2 Replies Last reply Reply Quote 1
                    • Bob.DigB
                      Bob.Dig LAYER 8 @jimp
                      last edited by

                      @jimp I also noticed a higher usage, even after another reboot with the RC-build from before the current RC.

                      1 Reply Last reply Reply Quote 0
                      • V
                        vizi0n @jimp
                        last edited by

                        @jimp thanks for the info !

                        1 Reply Last reply Reply Quote 0
                        • M
                          mer
                          last edited by

                          In general ZFS may try to use more RAM than other filesystems (like UFS) but a lot depends on the actual usage patterns. Reads cause ARC (read cache) to increase which increases RAM useage, writes wind up in a different location, simplistically "transaction groups". Writes are held until either a timer expires (nominally 30secs) or a lot of items need to be written (not sure but on the order of maybe 4K or 4M).

                          A firewall would be mostly writes so I'd expect it to go up and down if you are logging a lot. Not sure if pfSense is creating a RAM disk for anything, but that would also increase useage.
                          The cached memory could be ZFS buffers, could also be network buffers.

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