Re: [PATCH] Fixed and polished SMP store stats collection

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 13 Oct 2011 12:00:09 +1300

 On Wed, 12 Oct 2011 15:27:23 -0600, Alex Rousskov wrote:
> SMP shared memory cache stats were not collected.
>
> Mean disk object size stats were aggregated inaccurately for SMP.
>
> Moved Store-related stats into a dedicated StoreStats class,
> encapsulating memory cache-related (mem), disk cache-related (swap),
> and
> global store (number of objects) stats. Used consistent naming scheme
> to
> make memory and disk stats more alike (we could create a class to
> represent "store device" stats of sorts, but that seems like an
> overkill
> at this time).

 Looks to me like the only difference between struct Mem and struct Swap
 is the "shared" variable member.

 You could cover that consistency problem and drop about 10 LOC by
 inheriting struct Mem from struct Swap if you don't want to combine them
 fully.

>
> Moved Store stats collection into corresponding Store classes rather
> than forcing GetInfo() in stat.cc to know how to deal with all Store
> stats.
>
>
> The new code seems to work in my very limited tests but I am pretty
> sure
> more stats/SMP-related fixes will be needed.

 Looks like it should cover the described cases.

 +1 on the current version anyway.

 Amos
Received on Wed Oct 12 2011 - 23:00:25 MDT

This archive was generated by hypermail 2.2.0 : Fri Oct 14 2011 - 12:00:15 MDT