Issue metadata
Sign in to add a comment
|
Modify leveldb memory-infra reporting to account for shared cache. |
||||||||||||||||||||||||
Issue descriptionIn commit #488099 a shared read block cache was introduced for some uses of leveldb. This complicates the reporting of leveldb as the resource cost of the block cache is amortized over all open databases. One of the following needs to be done: 1. If a block can be associated with a specific database then associate that use appropriately. 2. If not #1 then use the appropriate memory-infra API to associate the shared resource with all leveldb using that cache.
,
Jul 31 2017
,
Jul 31 2017
,
Jul 31 2017
,
Aug 2 2017
dskiba@ Please advise on the correct *MemoryDump function to use for this reporting and assign back to me. thx.
,
Aug 3 2017
,
Aug 7 2017
I saw a comment that suggested the correct way to do this is with AddSuballocation.
,
Aug 7 2017
I think we should report shared resources (env and block cache) as follows:
1. Include size of a shared resource to DB's total number
2. Report shared resource separately
3. Suballocate shared resource from DB
For example for block cache:
1. Size of block cache is already included to DB::GetProperty("approximate-memory-usage"). The only change here is to report databases as "leveldatabase/db/0x..." instead of "leveldatabase/0x..." for consistency.
2. Report size of block cache as "leveldatabase/block_cache/0x....".
3. Suballocate "leveldatabase/block_cache/0x...." from "leveldatabase/db/0x...".
And then memory-infra should correctly calculate totals for "leveldatabase" and each "leveldatabase/db". The only thing is that this calculation is done in the UI now, so there is no way we can write a unittest. Although I think there is work to move that calculation to Chrome itself.
In the end we should end up with "leveldatabase" provider that surfaces:
1. Totals per shared resource (block cache, env).
2. Totals per DB (with shared resource accounted proportionally).
ssid@, does this sound good to you? Who is responsible for moving calculation of totals from UI to Chrome itself?
,
Aug 7 2017
ssid@, please see previous comment.
,
Oct 11 2017
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by cmumford@chromium.org
, Jul 31 2017