Messages in this thread | | | Date | Fri, 30 Sep 2005 11:20:14 -0400 | From | Brian Gerst <> | Subject | Re: RH30: Virtual Mem shot heavily by locale-archive... |
| |
Arijit Das wrote: > I have RH3.0 installed in an AMD64 machine. > > In this system, when I look at the virtual address space mappings of a process (say a sleep process), I find that almost 80% of its virtual address space has been taken by a private copy of /usr/lib/locale/locale-archive mapped to its virtual address space by default. Check this: > > 31396 KB r--p /usr/lib/locale/locale-archive >
Only the pages of the file that are actually accessed are loaded into physical memory. This mapping just reserves a slot of virtual memory for those demand loaded pages to be mapped.
> Total Virtual Memory = 38816 KB > On the other hand, when I look at the same info in a RH7.2 system, I see that a few small set of essential locale files have been mapped whose overall summed up size is around 236KB (way smaller than RH3.0)...Check this: > 4 r--p /usr/lib/locale/en_US/LC_IDENTIFICATION > 4 r--p /usr/lib/locale/en_US/LC_MEASUREMENT > 4 r--p /usr/lib/locale/en_US/LC_TELEPHONE > 4 r--p /usr/lib/locale/en_US/LC_ADDRESS > 4 r--p /usr/lib/locale/en_US/LC_NAME > 4 r--p /usr/lib/locale/en_US/LC_PAPER > 4 r--p /usr/lib/locale/en_US/LC_MESSAGES/SYS_LC_MESSAGES > 4 r--p /usr/lib/locale/en_US/LC_MONETARY > 24 r--p /usr/lib/locale/en_US/LC_COLLATE > 4 r--p /usr/lib/locale/en_US/LC_TIME > 4 r--p /usr/lib/locale/en_US/LC_NUMERIC > 172 r--p /usr/lib/locale/en_US/LC_CTYPE > This seems like a huge requirement of memory for each small process executed in the RH3.0 system and hence, shots up the memory requirement of the entire system because the mapped region /usr/lib/locale/locale-archive is privately mapped.
Private mapping means copy-on-write. But since these mappings are read-only they will still be shared by other users of that file. So no extra physical memory for each process mapping the file.
-- Brian Gerst - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |