From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6b3ebf057333800c X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder3.cambrium.nl!feeder5.cambrium.nl!feed.tweaknews.nl!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: virtual memory, was Re: Largest size array in Gnat 2005 for the PC? References: <4726d889$1@news.post.ch> <8P-dnbw2Ydw2y7ranZ2dnUVZ_qOknZ2d@comcast.com> Date: Tue, 30 Oct 2007 21:35:30 +0100 Message-ID: <87myu0cpd9.fsf@ludovic-brenta.org> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:o5yi5vscgAYRM4xrOuQcxpWWQC0= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Tele2 X-Trace: DXC=RUC;^`[DbiYo_LXIbUAeEX6`Y6aWje^YZmX]7R`3AhJZ0:LXdOJL[Kh`S:\ Xref: g2news2.google.com comp.lang.ada:2656 Date: 2007-10-30T21:35:30+01:00 List-Id: tmoran@acm.org 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.