High memory usage when using pkg reddit / freebsd ---------------------------------------------------------------------- TheRedBased · 2020-10-08 16:52 Hi, I'm still very new to FreeBSD but I like it a lot :D Version is 12.1 But I have one problem: When I want to install `sage-math`, which is a huge package, with the `pkg` tool. But when installing, pkg fills up my whole RAM and swap. The device is an old ThinkPad with only 4GB of RAM. This makes the system very unresponsive and it takes forever to even get to 1% of the installation. Is it possible that pkg unpacks the package to RAM first and then writes it to the disk? Can I do something about this? I have an Arch Linux installation on another disk on the same machine, and `pacman` installs packages which are similar in size just fine with almost no memory usage. ---------------------------------------------------------------------- j0e74 · 2020-10-08 17:23 There is a recent update of `pkg`. Try to do a `pkg upgrade` before installing anything else. ---------------------------------------------------------------------- nahnah2017 · 2020-10-09 12:27 Along with sage, this required about 25 other packages installed along with it. That Arch installs different packages with less memory does not mean it also installs sage-math with less memory. ---------------------------------------------------------------------- daemonpenguin · 2020-10-09 13:13 I don't imagine pkg would unpack the _entire_ package to RAM before writing it to disk. Even if it did, would the package be 4GB in size? That seems unlikely. This might be worth filing a bug report for. In the meantime perhaps see what happens if you try installing the sage-math dependencies one at a time. The issue might be with dependency resolution rather than unpacking files, in which case handing dependencies manually one at a time may work around the issue. ---------------------------------------------------------------------- TheRedBased · 2020-10-09 13:57 All the dependencies are already installed successfully with only sage itself is remaining. I'll try to upgrade pkg first like u/j0e74 suggested.