maria-developers team mailing list archive
Mailing list archive
Re: New (by Igor): Partitioned Key Cache for MyISAM (85)
On 14/02/2010, at 8:10 AM, worklog-noreply@xxxxxxxxxxxx wrote:
A partitioned key cache is a collection of structures for regular
caches called key cache partitions. Any page from a file can be
placed into a
buffer of only one partition. The number of the partition is
calculated from the
file number and the position of the page in the file, and it's
always the same
for the page. The function that maps pages into partitions takes
care of even
distribution of pages among partitions.
Partition key cache mitigate one of the major problem of simple key
thread contention for key cache lock (mutex). Every call of a key
interface function must acquire this lock. So threads compete for
this lock even
in the case when they have acquired shared locks for the file and
want read from are in the key cache buffers. When working with a
cache any key cache interface function that needs only one page has
the key cache lock only for the partition the page is ascribed to.
the chances for threads not compete for the same key cache lock
The idea and the original of the partitioned key cache was provided
by one of
our external contributers.
Great idea, but something it needs accessible stats to make it usable.
Right now we can already have multiple key caches, but there's no way
to see the stats of them, so that makes it very difficult to use in a
production environment - I prefer to not have to guess how well a
cache is doing ;-)
- FIRST figure out a way to make stats for multiple key cache visible
- implement that for the current multi keycaches
- then add the partitioned key cache feature
Arjen Lentz, Exec.Director @ Open Query (http://openquery.com)
Exceptional Services for MySQL at a fixed budget.
Follow our blog at http://openquery.com/blog/
OurDelta: packages for MySQL and MariaDB @ http://ourdelta.org