fredag 6 september 2013

Making sense of histograms and fine-grained locking

The histograms are now properly generated. The main cause for histograms turning out incorrect was because matplotlib stores state in its convenience module pyplot.  Adding code to clear the drawing after each plot fixed the issue.  I can now visualize parts of histograms. This is a macro graph of coverage from 1%-100% (since 0% is a huge spike which skews the diagram):

I've shown this before.  Again, we clearly see a big divide between long-lived objects and short-lived objects. This is good! Zooming in on the even more short-lived objects between 0% and 0.1%:

Okay, there's a huge amount of extremely short-lived objects, pushing down all the others.  Just moving slightly past those, into 0.01% to 2%, we see a more nuanced view:

Still, most objects are clustered into <= ~20% or >= 80%, with not many being equally used, and a lot of them with essentially no lifetime at all. This makes it easier to reason about locked objects.

Leads us into next problem.  While I can get the lifetime of a handle and determine if it's locked/not locked, I'd prefer to get finer-grained locking information.  Specifically, what I need to do is to for each point in time store if a handle is in a locked or unlocked state.  This'll be a boolean value, in the form of:

locking[handle] = [bool]*op_count_during_handle_lifetime

The bool will most likely be a threshold from the activity measurement (own ops / other ops, most likely), but I also hope to see a pattern where activity is clustered in <<50% and >>50%.  While I might not come up with something better than what I have now (locked during its entire lifetime), the structure will still serve me when doing rmalloc benchmarking. (Just with an array filled with True).

Checking out after 6h58m,

Inga kommentarer:

Skicka en kommentar