Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why do swap -l, swap -s and /tmp disagree about the amount of swap?

disagree swap tmp
0
Posted

Why do swap -l, swap -s and /tmp disagree about the amount of swap?

0

First of all, let’s get the tmpfs issue (/tmp, /var/run) out of the way. The tmpfs filesystem is a filesystem that takes memory from the virtual memory pool. What it lists as size of swap is the sum of the space currently taken by the filesystem and the available swap space unless the size is limited with the size=xxxx option. In other words, the “size” of a tmpfs filesystem has nothing to do with the size of swap; at most with the available swap. The second confusing issue is what “swap” really is. Solaris defines swap as the sum total of physical memory not otherwise used and physical swap. This is confusing to some who believe that swap is just the physical swap space. The “swap -l” command will list the swap devices and files configured and how much of them is already in use. The “swap -s” command will list the size of virtual swap. Physical swap added to the physical memory. On systems with plenty of memory, “swap -l” will typically show little or no swap space use but “swap -s” w

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.