This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Sven Eschenberg writes:I assume this all depends on the usage scenario etc. . If /tmp is on disk (which it often is, because it can grow pretty big), you
> Anyway, what I meant: Compiling a package like firefox, glibc > etc. with ccache gives you some speed increase, but it is small > compared to uncompressing the source directly into a ram disk and > build everything in there.
That sounds pretty surprising to me. How is a RAM disk going to be so
much faster than. say, /tmp? I suppose there's no overhead of writing
the files back to disk after updating them, but thet's usually done in
the background anyway. "make -jN" is usually enough to swallow up any
rotational latency. But when I'm compling, all CPU cores are usually
at 90% plus; the compiler certainly isn't waiting for disk. That RAM
disk is going to get me 10% more at best.
> Combining both didn't seem to give additional reproduceableAh okay, I forgot the disk IO, but this makes perfect sense ...
> benefit, but I gotta admit, never tried to put ccache's data into a
> ramdisk too, since I don't have enough ram for that on sufficently
> big enough packages. If -j2 speeds things, it's mostly because of
> the kernel's scheduling, I assume.
> > The only box I got left, which is Uniprocessore and doesn't have
> HT/Multiple cores didn't really compile faster with -j2 - Then
> again it is a server, which has a certain minor load anyway all the
> time, that's why I assume -j2 on Uniprocessor only benefits from
> scheduling strategies.
The main purpose of -j2 on a uniprocessor is to absorb any disk latency: when one process blocks because a file is not ready, another process has something useful to do. It's not a huge win when building gcc, but it is significant. It is very usefule when building on an NFS-mounted drive.
Andrew.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |