Forcing Kyoto Cabinet HashDB index in memory?

96 views
Skip to first unread message

Tarandeep Gill

unread,
Apr 3, 2013, 5:35:46 PM4/3/13
to tokyocabi...@googlegroups.com
Is the Kyoto Cabinet index saved in memory, or is it fetched from the disk for every write/update operation? If not, how to force it to memory?

Ulrich

unread,
Apr 8, 2013, 1:24:31 PM4/8/13
to tokyocabi...@googlegroups.com
On 03.04.2013 23:35, Tarandeep Gill wrote:
> Is the Kyoto Cabinet index saved in memory, or is it fetched from the
> disk for every write/update operation? If not, how to force it to memory?
>
Yes it is cached in memory:

"Kyoto Cabinet attains performance improvement in retrieval by loading
the whole of the bucket array onto the RAM. If the bucket array is on
RAM, it is possible to access a region of a target record by about one
set of file operations such as `lseek', `read', and `write'. The bucket
array saved in a file is not read into RAM with the `read' call but
directly mapped to RAM with the `mmap' call. Therefore, preparation time
on connecting to a database is very short, and two or more processes can
share the same memory map."
Reply all
Reply to author
Forward
0 new messages