Solved Swapfile full

  • Add more main memory
  • Add additional swap partition or swapfile
  • Close unused programs
  • If memory not-yet-fixed memory leaks are the issue, periodically shutdown and restart until the issues are addressed and fixed.
 
A quick, and often fully sufficient glance you get by
ps -aux
or
top
this may not help you on finding a memory leak per se, but at least get an idea who is the bad guy (if there is one) using most memory, and what could, or should be terminated.
Then there is procstat(1) which can give you more information on a certain process, like
procstat -r [PID]

While in most of the cases it's no memory leak, but simply your RAM is full - too small for what you are trying to do; e.g. trying to run KDE, Firefox, Chrome, Libreoffice, Virtualbox with a Win11, some large pictures in Gimp while watching a HD movie, and recording its audio with audacity, and building world all at the same time, then maybe 4GB RAM could be a bit meagre for all this at the same time.
 
I have dozens of Chrome tabs open so I'm sure Chrome is eating up my memory.

Is there some way of preserving the addresses of those tabs as I've probably spent ages finding some info I would like to be able to retrieve some information in future without going on the same treasure hunt.

If I close a tab, will that release memory?
 
I have dozens of Chrome tabs open so I'm sure Chrome is eating up my memory.

Is there some way of preserving the addresses of those tabs as I've probably spent ages finding some info I would like to be able to retrieve some information in future without going on the same treasure hunt.

If I close a tab, will that release memory?
Closing Chrome itself will free up a lot. When you restart it, it will not load everything right away but will do a "lazy loading", only loading the active tab and a few visible tabs until you load more by actively clicking on them.
Of course, make sure you can actually reload tabs on startup (Settings > On startup > Continue where you left off, or something like that).

Since most modern browsers (definitely Chrome, Firefox and all their derivatives) have a multi-process architecture (one per tab by default), closing a tab will also free up some memory.
Take into consideration that all tabs are not created equally: a tab with dynamic content or multimedia will be heavier than one with static content.

You can always bookmark tabs or copy their URLs to a text editor for later use. Twenty open YouTube tabs are definitely a good candidate for that.
 
I have dozens of Chrome tabs open so I'm sure Chrome is eating up my memory.

Is there some way of preserving the addresses of those tabs as I've probably spent ages finding some info I would like to be able to retrieve some information in future without going on the same treasure hunt.

If I close a tab, will that release memory?

Extension "session buddy" will deal with remembering your tabs.

You can also go into the task manager inside Chrome and randomly kill tabs you don't need right now. The tab will stay open with no content, but the URL stays. Later you can just hit reload to get the contents back.
 
Thanks for the suggestion.

Just closing Chrome made a huge difference. I didn't need to do a reboot.

Maybe I should close down Chrome every couple of days.
 
Extension "session buddy" will deal with remembering your tabs.

You can also go into the task manager inside Chrome and randomly kill tabs you don't need right now. The tab will stay open with no content, but the URL stays. Later you can just hit reload to get the contents back.
Many thanks.

I guess I'll need spend some time getting familiar with what it offers.

I have far too many tabs open but am hesitant to close some because of some info I tooks weeks trying to gather and have currently put on the back burner.
 
Many thanks.

I guess I'll need spend some time getting familiar with what it offers.

I have far too many tabs open but am hesitant to close some because of some info I tooks weeks trying to gather and have currently put on the back burner.

FWIW I usually have hundreds of tabs open and it works kind of fine. I know where you are coming from, some style of study works better with opening lots of tabs for later, and memory is cheaper than brain. Well, memory is actually not cheap anymore but you get the gist.

How much memory do you have, anyway? Why don't you add more swap?
 
I have far too many tabs open but am hesitant to close some because of some info I tooks weeks trying to gather and have currently put on the back burner.
Why not just using bookmarks? That is exactly their purpose.
_ on the bookmarks toolbar create a folder labeled by the subject you are working on 'blahblah'
_ bookmark all your tabs, for the location select the folder 'blahblah'
_ close your browser.
_ when you reopen your browser, right click on 'blahblah' and 'open all bookmarks'
that's it.

I've done that for years, some cleaning is required from time to time, but other than that it's fine.
I use this technique because I don't like having numerous tabs opened at the same time, I can't find anything like this, lesser is better for me.
 
Bookmarking isn't great.
But it does directly address this concern:
Is there some way of preserving the addresses of those tabs as I've probably spent ages finding some info I would like to be able to retrieve some information in future without going on the same treasure hunt.

My opinion, bookmarks are like files. They breed like rabbits and one needs to come up with a scheme to manage them.
I think search engines have gotten better/more consistent, but my problem is 6 months from now I can't remember the exact search terms I used to find the one link that was exactly what I wanted.
But everyone is different, has different tolerances.
 
But bookmarks, as opposed to open tabs, do not go away when you are done with a page.

My browsing style, and I think that of the OP, is to open all interesting links in tabs first before reading them as a batch. That requires that those you ticked off the list go away. Session Buddy supports this, bookmarks do not.
 
Different usage styles/habits I guess. I've always treated bookmarks as transient; "Oh this is good, let me save it so I can come back to it" I tend to review bookmarks periodically and delete ones no longer needed (like bectl and snapshots).
As for browser tabs, like windows, "too many open" makes me lose things. I've worked with people/help them debug they have literally 30 windows on the screen, then start opening/closing them to find the one they want. Drives me up a wall. "too many" tabs on a browser is the same thing to me.
But I recognize others can deal with it.
 
For me it is the other way round. I learned to deal with many open tabs. Trying to remember or re-look up something on the other hand is highly distracting.
 
FWIW I usually have hundreds of tabs open and it works kind of fine. I know where you are coming from, some style of study works better with opening lots of tabs for later, and memory is cheaper than brain. Well, memory is actually not cheap anymore but you get the gist.

How much memory do you have, anyway? Why don't you add more swap?

I have 16GB, but not sure how I would add swap space.

=> 40 1953525088 ada1 GPT (932G)
40 532480 1 efi (260M)
532520 1024 2 freebsd-boot (512K)
533544 984 - free - (492K)
534528 4194304 3 freebsd-swap (2.0G)
4728832 1948796296 4 freebsd-zfs (929G)
I think I will simply monitor the situation and close Chrome when the swapfile is full.

With that I think I will mark the query closed.
 
I'm using bookmarks and tabs differently.
Tabs for pages I "often" visit.
Bookmarks for pages I "rarely" visit or pages I want to visit when I could take time for it, in addition to pages loaded in tabs.
Imagine tabs to be cache, while bookmarks to be main memory as a metaphor.
(Or tabs to be register, while bookmarks as L1-Ln cache.)
 
Pages I often visit I get via autocompletion in the URL bar. At this time I use bookmark groups pretty much only for transporting them from one machine to another (in the same Chrome login).
 
Back
Top