On 8/31/2012 5:28 AM, Aryeh Gregor wrote:
On Thu, Aug 30, 2012 at 1:25 AM, Gregory Szorc <g...@mozilla.com> wrote:
If you have 9+GB of memory dedicated to building mozilla-central and you are
doing warm builds all the time, great, you probably don't need an SSD. But,
those conditions are specialized. You have to get things into the page
cache. That's a few GB of source files, the object files, ccache files, etc
over thousands of files. That's a lot of I/O and a lot of potential for I/O
wait. You also have everything else on your computer contending for that
page cache's memory.
Essentially if you have a server that does nothing but build mozilla-central
all day, you are probably fine without an SSD. (Note that Mozilla's build
infra doesn't qualify because AFAIK the machines are rebooted after every
build, purging the page cache in the process.) If you are building on your
everyday computer which is also running a window manager, Firefox, etc,
you'll likely have more page cache eviction and slower build times assuming
I/O wait isn't short.
In practice, I've noticed minimal difference using SSDs on my desktop,
which has 16G of RAM. I have lots of other stuff open, but all that
only uses a couple of gigs of RAM, so there should certainly be 9G for
page cache. (free -m reports about 7G used for buffers/cache.)
If you use a desktop and work on compiled code even part-time, at any
reasonable pay rate, I can't see any reason why you wouldn't get 16G
of RAM. Although it seems most people don't -- maybe people mostly
use laptops? 2x8G of desktop RAM is about $75 right now on Newegg,
and any decent motherboard should take that much these days.
I re-ran some builds on my desktop with my instrumented build system
that records system metrics and an SSD clobber build was only ~50s
faster than the same build on a 7200RPM drive. This comes out to ~5%,
which isn't much. Both results were on a freshly booted virtual machine
(read: empty page cache) that had access to 12GB of memory. This was
also with ccache disabled (all my previous measurements on list posts
and my personal blog were with ccache enabled, which definitely has an
impact on I/O).
I would say this result validates your statement of "minimal difference
using SSDs." Honestly, this surprised me, as it is counter to what I've
measured before, especially on my MBP, where the difference between SSD
and non-SSD is a few minutes.
As I said, these measurement were without ccache. What impact does
ccache have? Well, on that same 7200RPM drive, enabling ccache and
building with a purged ccache (the worst case) increased build times
from 1077s to 1245s. That's 15.6% slower! Granted, this is the worst
case for ccache (empty at start of build). And, I wasn't using any
CCACHE_HARDLINK or CCACHE_COMPRESS magic, so every object added to
ccache effectively incurred 2x write I/O. If we look at the raw numbers,
I see that total device write bytes with ccache nearly doubled to
~6.5GB! ccache also increased I/O wait times by ~2x. Given how I/O wait
is measured on Linux, it's very difficult to convert I/O wait to wall
clock time. This is why I refrain from specifying raw numbers. But,
there does seem to be a correlation. I stopped short of measuring a
ccache build on my SSD, which should isolate I/O wait and prove or
disprove I/O wait as the main contributor to the longer build times. So,
the "ccache builds considered harmful?" thread will have to wait. If I
had infinite time...
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform