User: Password:
|
|
Subscribe / Log in / New account

Toward improved page replacement

Toward improved page replacement

Posted Mar 31, 2007 14:06 UTC (Sat) by nix (subscriber, #2304)
In reply to: Toward improved page replacement by slamb
Parent article: Toward improved page replacement

On x86, `cachegrind' works well (of course it's monitoring a virtual
machine but it's still a good estimate).

I'll admit that on other platforms I often prove that cache smashing is at
fault for the sloth of some algorithm by rewriting the algorithm; if the
new one has the same formal time complexity yet is much faster merely
because the access patterns are different, it was a cache problem :)

A really crude approach is to turn off the L2 cache entirely (which many
motherboard/CPU combinations allow you to do) and see if your suspect
thingy gets vastly slower. :)


(Log in to post comments)

Toward improved page replacement

Posted Apr 6, 2007 0:50 UTC (Fri) by slamb (guest, #1070) [Link]

I've used cachegrind a few times (nice tool, easy to use), but it is only good for userspace so it wouldn't help here.

A coworker mentioned to me a while ago that our hardware (a rather obscure processor) provides counters of these events, which is why I asked about that specifically. In fact, he said such features were common.

I googled a bit and found this document describing event counters on AMD Opteron processors. I'm not sure if there's existing code in the Linux kernel to take advantage of this instrumentation or not.

Toward improved page replacement

Posted Apr 21, 2007 23:27 UTC (Sat) by nix (subscriber, #2304) [Link]

I know the PowerPC provides counters for this sort of thing as well. I
imagine most CPUs do these days: cache misses are so
performance-significant...

Toward improved page replacement

Posted Apr 24, 2007 7:42 UTC (Tue) by njs (guest, #40338) [Link]

>I'm not sure if there's existing code in the Linux kernel to take advantage of this instrumentation or not.

Indeed, there is, and it is Good:

http://oprofile.sourceforge.net


Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds