2

我们有京都大亨 [Kyoto Tycoon 0.9.55 (2.18) on Linux (Kyoto Cabinet 1.2.75)] 的小型设置,它是完全内存数据库并在 3 中共享,每个共享的主从架构。

目前,我们对保留在内存中的过期记录存在问题,并且内存利用率上升。

当我检查此文档http://fallabs.com/kyototycoon/spex.html#tips时 ,我根据描述在其中找到“ktremotemgr Vacuum”,它执行完整的 GC 操作。

但我一直在寻找另一种方式,比如配置参数,它负责从内存中删除过期记录。

请对此有任何帮助

谢谢

4

1 回答 1

1

kt将随机执行此操作,并且在某些情况下它是基于 LRU 的。是的,内存利用率会上升一段时间。

以下是来自同一链接的一些文档。

In addition, automatic deletion by the capacity limit is performed at random. In that case, fresh records may also be deleted soon. So, setting effectual expiration time not to reach the limit is very important. If you cannot calculate effectual expiration time beforehand, use the cache hash database instead of the default stash database. The following setting is suggested.
$ ktserver '*#bnum=20000000#capsiz=8g'
Note that the space effiency of the cache hash database is worse than that of the stash database. The limit should be up to 50% of the total memory size of the machine. However, automatic deletion by the "capsiz" parameter (not "ktcapsiz") of the cache hash database is based on LRU algorithm, which prevents fresh records from sudden deletion.
于 2014-08-18T15:22:19.320 回答