Re: virtual memory, was Re: Largest size array in Gnat 2005 for the PC?



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.
.



Relevant Pages

  • relic Have you learned how to post yet?
    ... As you have a selective memory, here is the source code for you. ... applications with a 4 GB virtual address space. ... that run on computers with more than 2 GB of physical memory. ... Address Windowing Extensions (AWE) enables applications to address more = ...
    (alt.os.windows-xp)
  • Re: RAM
    ... For applications that are I/O-intensive, ... The 4GT RAM Tuning feature increases the memory ... more than 2 GB of physical memory. ... VirtualAlloc function. ...
    (alt.os.windows-xp)
  • Re: 4GB Physical Memory Support
    ... Whether or not 4GB of physical memory is necessary is a moot point, the question remains why changing the page file size altered the amount of physical memory recognized by Windows. ... However, keep in mind that the PCI Hole exists as a result of addressing done by the BIOS, not by Windows. ...
    (microsoft.public.windowsxp.hardware)
  • Re: OS-question
    ... MacOS X supports>4GB of RAM on IA32 and so does FreeBSD but I don't know ... Linux can use up to 64 Gigabytes of physical memory on x86 systems. ... If you are compiling a kernel which will never run on a machine with ...
    (comp.arch)
  • Re: Available Physical Memory
    ... available physical memory and then allocate say 75% of that value just ... total memory available to work with. ... and determining a few performance parameters manually is not a big ... my own observation is that programmers are not often ...
    (comp.unix.programmer)