0
我在我的服務器上使用ehcache作爲熱緩存。我希望它完全在內存中,只能寫入磁盤以進行持久化。從應用程序重新啓動時加載回來。ehcache在每次寫入時沖洗到磁盤
我看到ehcache幾乎在每個緩存中寫入磁盤。這裏是什麼文件說
Operation of a Cache where overflowToDisk is false and diskPersistent is true
In this configuration case, the disk will be written on flush or shutdown.
The next time the cache is started, the disk store will initialise but will not permit overflow from the
MemoryStore. In all other respects it acts like a normal disk store.
然而,當我檢查的/ mnt/ehcache的我看到它被寫入到各裝。爲什麼會發生這種情況?
這是我的緩存配置。
<diskStore path="/mnt/ehcache/" />
<cache
name="feedLocalCache"
maxEntriesLocalHeap="2000000"
eternal="false"
timeToLiveSeconds="1800"
timeToIdleSeconds="0"
diskPersistent="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LFU" >
<bootstrapCacheLoaderFactory class="net.sf.ehcache.store.DiskStoreBootstrapCacheLoaderFactory" properties="bootstrapAsynchronously=true"/>
我的服務器負載很重。我會說我正在做每秒接近2k的提升以及每秒至少5k的讀取。任何想法如何我可以提高我的表現?因爲當我進行一些分析時,放置和獲取被視爲熱點之一。 –