9.0 crash, ssd or filesystem problem?

Gary Aitken freebsd at dreamchaser.org
Sun Nov 18 03:15:21 UTC 2012


On 11/17/12 19:50, Warren Block wrote:
> On Sat, 17 Nov 2012, Gary Aitken wrote:
> 
>>> There was a nice Sun white paper by Peter Snyder on tmpfs.  It's linked on the Wikipedia tmpfs page, but Oracle has broken the link.  Google has a rendered version of a PostScript copy (long URL):
>>> http://webcache.googleusercontent.com/search?q=cache:EXMeqvhFfrsJ:www.sun3arc.org/papers/OS/tmpfs_virtual_memory_filesystem.ps.gz+tmpfs+white+paper&cd=12&hl=en&ct=clnk&gl=us
>>
>> Thanks.
>> Interesting, I would have thought swap space for something in a tmpfs was
>> not allocated until it needed to be swapped out.  As I read it, used tmpfs
>> space reserves space in swap.
> 
> It uses VM, so tmpfs is a memory disk until you run low on memory, then
> it gets swapped out.  But until then, it's a RAM disk, with the added
> benefit of not eating a fixed chunk of RAM all the time.

I understand that. 
What surprised me was that the swap space is *allocated* up front along with
the memory allocation.  It's not written, but it is allocated.
Which would imply swap has to be at least as large as the largest tmp file
actually written.  So one can't have a memory tmp space larger than
the swap file.  If what the paper says still holds:
para 4.4:
"The location of swap space for an anonymous page is determined when
the anonymous memory is allocated."

While out chopping on the woodpile, 
I decided that was probably for deadlock prevention.

> Oh, and unless you have a very recent -STABLE or -HEAD, see
> http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/168544

I'll try not to shutdown :-)



More information about the freebsd-questions mailing list