X11 on small systems?
Joshua Judson Rosen
rozzin at geekspace.com
Mon Sep 13 21:54:51 EDT 2010
Benjamin Scott <dragonhawk at gmail.com> writes:
> On Mon, Sep 13, 2010 at 4:47 PM, Joshua Judson Rosen
> <rozzin at geekspace.com> wrote:
> >
> > Yes, however: several of the libraries that are exclusive to
> > the X server are actually things that would (or could) be eliminated
> > in different use-cases; the 4-MB Intel DRI module, for example,
>
> Good point. X.org doesn't necessarily have to be as heavy as it is
> on a desktop PC. And has been mentioned, there are more lightweight
> X servers out there.
... assuming that you even need an X server :)
> > > Virtual size can include things which aren't main RAM.
> >
> > I'm going to go a step further, contradicting the prevailing wisdom
> > of the Internet, and say that VSZ can even include that aren't even
> > properly `allocated *virtual* memory'. What I mean is:
> >
> > RSS != (VSZ - (amount of memory paged out to swap))
>
> Contrary to popular belief and several OS GUIs, "virtual memory"
> does not mean "using disk as virtual RAM". That is, "virtual memory"
> is *not* synonymous with "swap space".
Note that top(1), of all things, says:
o: VIRT -- Virtual Image (kb)
The total amount of virtual memory used by the task. It includes
all code, data and shared libraries plus pages that have been
swapped out.
VIRT = SWAP + RES.
p: SWAP -- Swapped size (kb)
The swapped out portion of a task’s total virtual memory image.
q: RES -- Resident size (kb)
The non-swapped physical memory a task has used.
Is it any wonder that people are confused?
> Virtual memory is the address space seen by a process and provided
> by the MMU.
[... excellent description of paging and what "virtual memory"
actually means, elided...]
> My expectation was that "virtual size" was the total size of all
> objects the kernel memory manager had associated with a given
> process's virtual memory space (not necessarily mapped). That would
> include all "regular" memory allocated, plus every mmap'ed file (and
> thus every shared library).
Exactly--thank you for taking the time to paint the picture more vividly :)
> For X, that might also include video card RAM. It might even
> include things which have no "real" representation at all:
>
> blackfire$ sudo memstat | grep nvidia0
> 42560k: PID 3000 (/dev/nvidia0)
> 3278332k: /dev/nvidia0 3000
> blackfire$
>
> That's over 3 GiB. My video card has 256 MiB RAM, main RAM is 1
> GiB. So whatever that is, it isn't hardware.
[...]
> But in any event, "virtual memory" doesn't have any necessary
> correlation to committed primary or secondary storage (i.e., RAM or
> disk).
Which reminds me: let's not forget /proc/sys/vm/overcommit* :)
--
"Don't be afraid to ask (λf.((λx.xx) (λr.f(rr))))."
More information about the gnhlug-discuss
mailing list