Re: virtual memory, was Re: Largest size array in Gnat 2005 for the PC?
- From: Ludovic Brenta <ludovic@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 30 Oct 2007 21:35:30 +0100
tmoran@xxxxxxx writes:
How much virtual memory does your computer have?I wonder how many programmers today have any experience with the
judicious use of virtual memory. PC users almost always buy enough
physical memory to satisfy all their apps, and with 32 bit machines
that was cheap and easy.
There will probably also be a learning curve as todays' programmers
find out what "judicious use" means w.r.t. multiple CPUs.
My laptop has two cores and two gigs of memory. I routinely build GCC
4.2 in a 1280-MiB tmpfs in memory. This is large enough for all
temporary files; at the end of the build, just under 990 MiB are still
in use. The build uses 3 threads (i.e. one more than the number of
cores) and the system uses approximately 400 Mb of physical swap, but
that's because I keep X, emacs and galeon running all the time :) No
thrashing takes place and the system is very responsive even during a
build.
In my experience, building in a tmpfs is approximately 3 times as fast
as on a regulsr (XFS) filesystem, even though the kernel has lots of
physical memory to use as a disk cache.
I suggested this solution to Xavier Grave, who builds GCC 4.2 on a
dual-core, dual-thread POWER5 machine with 8 GiB of physical RAM. He
also reported a three-fold improvement (roughly) even though each of
the cores has a 36 MiB level 3 cache that can probably hold all of
GCC :)
Note that we didn't even bother to measure the improvement precisely,
so it is very unscientific.
--
Ludovic Brenta.
.
- References:
- Re: Largest size array in Gnat 2005 for the PC?
- From: Martin Krischik
- virtual memory, was Re: Largest size array in Gnat 2005 for the PC?
- From: tmoran
- Re: Largest size array in Gnat 2005 for the PC?
- Prev by Date: Re: Largest size array in Gnat 2005 for the PC?
- Next by Date: Re: Largest size array in Gnat 2005 for the PC?
- Previous by thread: Re: virtual memory, was Re: Largest size array in Gnat 2005 for the PC?
- Next by thread: Re: Largest size array in Gnat 2005 for the PC?
- Index(es):
Relevant Pages
|