This is a weird problem...
I have these problem during NetBSD 9.0 -> NetBSD 9.1
I also check this post and the final solution after all is switch to NetBSD-Stable branch.
https://www.unitedbsd.com/d/171-netbsd-90-huge-memory-usage

That is too bad. I don't want to move to NetBSD-Stable branch right now. And I don't want to throw NetBSD out of my world. I hope I can find solution in here.

I have read https://en.wikipedia.org/wiki/Memory_paging#Unix_and_Unix-like_systems and I think I know a little bit.

The only thing I want to do is enable swap space

here is my /etc/fstab

/dev/wd0a / ffs rw 1 1
/dev/wd0b none swap sw,dp 0 0
tmpfs /tmp tmpfs rw,-m=1777,-s=ram%25
kernfs /kern kernfs rw
ptyfs /dev/pts ptyfs rw
procfs /proc procfs rw
/dev/cd0a /cdrom cd9660 ro,noauto
tmpfs /var/shm tmpfs rw,-m1777,-sram%25

here is my mount:

/dev/wd0a on / type ffs (local)
tmpfs on /tmp type tmpfs (local)
kernfs on /kern type kernfs (local)
ptyfs on /dev/pts type ptyfs (local)
procfs on /proc type procfs (local)
tmpfs on /var/shm type tmpfs (local)

I sometimes see swapctl: adding /dev/wd0b as swap device at pririority 0 when I boot to the system.

And how to can I use swapctl or something to enable swap?

    strawman2511 The only thing I want to do is enable swap space

    Going by your fstab it should be enabled. Post the output of these 2 commands:

    # Show swap statistics
    swapctl -l > swapctl.out.txt
    
    # Show top 20 memory hogs
    top -n -ores 20 > top.out.txt

    strawman2511 That is too bad. I don't want to move to NetBSD-Stable branch right now

    STABLE is where you should be, because STABLE = RELEASE + latest bug-fixes.
    (Or are you an entomologist?)

      I don't know that NetBSD-STABLE is difference than FreeBSD-STABLE. FreeBSD-STABLE mean still testing and still have some bugs before they have major release.

      pin Why?
      rvp (Or are you an entomologist?)

      Heating my NetBSD box? I don't usually do that and I don't like wasting time.

      I can still do it but do I have others choice?

      I don't like pkgin so that is the reason why I took a lot of time in compilation. And now my NetBSD box hotter than FreeBSD and OpenBSD. So hot...

      • pin replied to this.

        strawman2511 like @rvp said, STABLE = RELEASE + latest bug-fixes

        I'd add security-patches to that.

        strawman2511 I don't like pkgin

        To everyone its own.

        EDIT: In case you don't know, upgrading from 9.1_RELEASE to 9.1_STABLE does not require a re-install. You can do it using sysinst or sysupgrade, pick your poison. I always use sysinst.
        Moreover, the binaries you've already built will run on STABLE without itches.

        • neb likes this.

        Fun fact:
        OpenBSD and NetBSD always force users to become advanced user even they don't WANT TO.

        I am out of mind 😮

        • pin replied to this.

          I am sorry, but what happen if I already destroyed NetBSD. Is there any netbsd-stable.iso file for me to make a USB bootable?

          • pin replied to this.

            Okay, but I have moved to NetBSD9-Stable and don't see any difference between NetBSD9.1 and NetBSD-Stable. I still have the same issue, that is swap space doesn't work.

            • rvp replied to this.

              strawman2511 that is swap space doesn't work.

              No swap space is being used because the system has sufficient memory. It's working perfectly.

              BTW: there's no need to post screenshots. Just redirect the command's output to a file, then just paste it here. (See updated commands, above.)

              • neb likes this.