Re: shm in databases (was: MM deadlock)

Andrea Arcangeli (andrea@e-mind.com)
Fri, 15 Jan 1999 00:37:44 +0100 (CET)


On 14 Jan 1999, Uwe Ohse wrote:

> andrea@e-mind.com wrote:
>
> >I was't aware of that. I noticed that also postgres (a big database) uses
> >shm but it's _only_ something like 1 Mbyte (at least during trivial
> >usage). With my current code such 1 Mbyte would not be touched unless
>
> db root# ipcs -m
>
> ------ Shared Memory Segments --------
> key shmid owner perms bytes nattch status
> 0x52564801 768 root 660 33554432 11
> 0x52564802 769 root 660 10248192 11
> 0x52564803 770 root 660 8192000 11
> 0x52564804 771 root 660 8388608 11
>
> That's informix on linux.

That's not huge (supposing you have something like 128mbyte of phys ram).
But as just said even if if such memory would be huge, if it's really used
as cache for the data, the shm has to be set as SHM_LOCKED (not swappable
out) so the shm swapout code (even if superoptimized) would have no way to
touch it.

Andrea Arcangeli

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/