top - wired
Ivan Dolnák
ivan.dolnak at gmail.com
Mon May 30 23:04:54 CEST 2011
Ahoj,
budem citovať z knihy Absolute FreeBSD The Complete Guide to FreeBSD,
2nd Edition, pričom posledný odstavec by pravdepodobne mohol byť
odpoveďou na tvoju otázku.
The Mem line represents the usage of physical RAM. FreeBSD breaks
memory usage into several different categories.
Active memory is the total amount of memory in use by user processes.
When a program ends, the memory it had used is placed into inactive
memory and the data pulled from the disk is put into cache memory. If
the system has to run this program again, it can retrieve the software
from memory instead of disk.
Similarly, the Buf entry shows the size of the memory buffer. This
buffer contains most of the data recently read from the disk. The
memory in Buf is actually a subset of the active, inactive, and cache
entries, not an entirely separate category.
Free memory is totally unused. It might be memory that has never been
accessed, or it might be memory released by a process. If you have a
server that's been up for months, and it still has free memory, you
might consider putting some of that RAM in a machine that's hurting
for memory.
FreeBSD will shuffle memory between the inactive, cache, and free
categories as needed to maintain a pool of available memory. Memory in
the cache is most easily transferred to the free pool. When cache
memory gets low and FreeBSD needs still more free memory, it picks
pages from the inactive pool, verifies that it can use them as free
memory, and moves them to the free pool. FreeBSD tries to keep the
total number of free and cache pages above the sysctl
vm.v_free_target. (Remember, the page size is given by the sysctl
hw.pagesize which is 4,096 on i386 and amd64 systems.)
This means that having free memory does not mean that your system has
enough memory. If vmstat(8) shows that you are swapping at all, you
are out of memory. You might have a program that releases memory on a
regular basis. Also, FreeBSD will move some pages from cache to free
in an effort to maintain a certain level of free memory.
FreeBSD uses wired memory for in-kernel data structures, as well as
for system calls that must have a particular piece of memory
immediately available. Wired memory is never swapped or paged.
Ivan
2011/5/28 Radek Krejča <radek.krejca na starnet.cz>:
> Ahoj,
>
> mam trochu zacatecnicky dotaz, nicmene uplne mi to neni jasne. Pokud mam top, tak jeden stav pameti je wired. Co to presne znamena a co to s ohledem na volne/mozne volne/obsazene zdroje obnasi? Na internetu jsem nalezl pro linux a mac (shrnuto do kostky), ze se jedna o pamet, ktera je zamcena systemem, ale je v pripade mac po case uvolnena a u linuxu na pozadani nekterymi procesy, ktere to umi. Jak je to v pripade freebsd (pokud tedy ovsem clanek, co jsem nalezl, nekecal)?
>
> Jinak z man top moudry moc nejsem....
>
> Wired: number of bytes wired down, including cached file data pages
>
> Diky
> Radek
>
>
>
> --
> FreeBSD mailing list (users-l na freebsd.cz)
> http://www.freebsd.cz/listserv/listinfo/users-l
>
More information about the Users-l
mailing list