Someone wrote in [personal profile] robbat2 2008-09-14 11:28 am (UTC)

~2.5M chances, 29.35% hit rate, here (from 2004-06)

cache hit 739238
cache miss 1779705
called for link 241305
multiple source files 718
compile failed 52094
ccache internal error 3
preprocessor error 41296
bad compiler arguments 38
not a C/C++ file 120620
autoconf compile/link 439280
unsupported compiler option 98390
output to a non-regular file 1
no input file 171030
files in cache 172557
cache size 1.8 Gbytes
max cache size 2.0 Gbytes


Figuring your ccache at 975 days (365+365+245, give or take a couple), with 1,062,750 "chances" (hits + misses), you're running 1090 chances/day, average.

My ccache is even older... 2004-06-25 (pretty close to as soon as possible while installing Gentoo, IIRC I installed ccache before I did the first system remerge on an install from stage-one), 4 years plus, total 1541 days, with 2,518,943 "chances", 1634.6 chances/day, average.

The higher chances and higher it rate correspond, and are likely due to three reasons.

First, back then I was running "cheap" memory that could barely keep up with its rated bandwidth. It'd occasionally drop a bit, more often with an active system... like when compiling... so I relied heavily on ccache to even be able to complete merges, on big packages often crashing, rebooting and restarting the merge, getting a bit farther with the help of ccache, then crashing again... two, three, more times before I'd actually complete a big package. Of course that upped my ccache hitcount and chances/day rate too.

Second, I've a much better system now, with 2x dual-core and 8 gig ram (stable now!), and run PORTAGE_TMPDIR pointed at tmpfs. With PORTAGE_NICENESS=19, I can run a huge amount of makeops and with portage 2.2 now automated parallel merges in the background, without significantly killing system responsiveness. It's no longer a big deal to do an emerge --emptytree @system @world every so often... so I do. (Last time was to test the new automated parallel merge functionality in portage 2.2.) Again, that ups both the hitcount and chances/day.

Third, while I'm only running a couple "live" packages ATM, I do run ~arch, and run testing snapshots and live packages fairly routinely. Again, that's going to increase both the hitcount and the per-day average.

So... comparing your figures and mine, it looks like an ordinary Gentoo user can expect perhaps a 20% hitrate on maybe a thousand chances per day, while an active (still non-dev) user may up that to 30-ish percent and 1.5-1.6 Kchances/day. That 50% mentioned in the first comment... that's a LOT of repeat building, rather atypical for the ordinary user, I'd say (tho a dev using ccache on his active projects could well hit that).

I'm glad you posted this! I'd not had a chance to compare with anyone else's figures. I hope a few others post their figures as well! =:^)

Duncan

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org