# Simple question on laundry memory



## Alain De Vos (Jul 1, 2019)

Should I consider "laundry memory" as "used memory" or as "available memory".
[sysctl vm.stats.vm.v_laundry_count]


----------



## mark_j (Jul 1, 2019)

Alain De Vos said:


> Should I consider "laundry memory" as "used memory" or as "available memory".
> [sysctl vm.stats.vm.v_laundry_count]





			Memory - FreeBSD Wiki
		

It's used memory, soon to be available memory (inactive) or could even be re-determined to be unavailable (active). Either way, it's unavailable at that instance.


----------



## tarkhil (Oct 31, 2021)

mark_j said:


> Memory - FreeBSD Wiki
> 
> 
> It's used memory, soon to be available memory (inactive) or could even be re-determined to be unavailable (active). Either way, it's unavailable at that instance.



What should I do to monitor laundry memory in Zabbix?
What can cause memory to get stuck in laundry?
Sometimes I see laundry slowly growing, until all memory is used up.


----------



## cmoerz (Oct 31, 2021)

That might be an indicator for a memory leak. You probably want to monitor memory use overall, not laundry specifically. Generally speaking, a growing laundry list may point at pages that never properly get around to being swapped out.
There's a pretty good write up on swapping and laundry on the forum:









						Exploring Swap on FreeBSD
					

Exploring Swap on FreeBSD Free Memory is Wasted Memory or How to Make The Best Use of Swap    On modern Unix-like systems such as FreeBSD, “swapping” refers to the activity of paging out the contents of memory to a disk and then paging it back in on demand. The page-out activity occurs in...




					forums.freebsd.org
				




Addendum: you probably could also be running without any swap at all. I suppose that could also lead to pages never getting paged and instead staying on the laundry list, if I'm not mistaken.


----------



## tarkhil (Oct 31, 2021)

cmoerz said:


> That might be an indicator for a memory leak. You probably want to monitor memory use overall, not laundry specifically. Generally speaking, a growing laundry list may point at pages that never properly get around to being swapped out.
> There's a pretty good write up on swapping and laundry on the forum:
> 
> 
> ...


I do run swap. Okay, I'll read that thread


----------



## mark_j (Nov 1, 2021)

tarkhil said:


> What should I do to monitor laundry memory in Zabbix?
> What can cause memory to get stuck in laundry?
> Sometimes I see laundry slowly growing, until all memory is used up.


1. Ask Zabbix? I have no idea about zabbix.
2. It will be stuck if it's not needed. If it's needed & not being released by the kernel, then it's a bug in either the thread or the queue or both.
They go fromlaundry to inactive or if in laundry and get accessed they go to the end of the queue.

I guess in an ideal world laundry should quickly move pages out to inactive but it doesn't because other things can happen to affect that.


----------

