<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Datomic Knowledgebase - Recent questions tagged memcached</title>
<link>https://ask.datomic.com/index.php/tag/memcached</link>
<description>Powered by Question2Answer</description>
<item>
<title>Does the transactor eagerly fill memcached with indexed segments?</title>
<link>https://ask.datomic.com/index.php/605/does-transactor-eagerly-fill-memcached-with-indexed-segments</link>
<description>&lt;p&gt;The datomic &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/on-prem/overview/caching.html#memcached&quot;&gt;transactor memcached documentation&lt;/a&gt; says this:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;When configured to used memcached, a Datomic process will automatically write into memcached any segment it needs that is not already present in memcached. &lt;strong&gt;In addition, the transactor (only) will write index and log segments to memcached as the segments are produced.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;(Emphasis mine.)&lt;/p&gt;
&lt;p&gt;Based on this sentence and assuming a memcached memory pool larger than the storage size that is shared by transactor and peer, my expectation is the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;As the transactor is building an index, it writes newly-created index segments to storage &lt;em&gt;and&lt;/em&gt; to memcached at roughly the same time.&lt;/li&gt;
&lt;li&gt;When the index is finished, it commits the new index root and informs all peers of the new index.&lt;/li&gt;
&lt;li&gt;Any peers using the &lt;em&gt;same&lt;/em&gt; memcached cluster should, at the moment the index is released:&lt;ul&gt;
&lt;li&gt;have a &lt;em&gt;decreasing&lt;/em&gt; ObjectCache hitrate because newly-indexed segments are not cached&lt;/li&gt;
&lt;li&gt;but an &lt;em&gt;increasing&lt;/em&gt; memcached GET count&lt;/li&gt;
&lt;li&gt;and a flat StorageGet and MemcachedPut count because the segments are already in memcached&lt;/li&gt;
&lt;li&gt;For an overall flat or increasing memcached hitrate.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Instead, what I actually see is that when peers accept a new index,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;there's a &lt;em&gt;dramatic&lt;/em&gt; decrease in Memcached hitrate&lt;/li&gt;
&lt;li&gt;and increase in MemcachedPut counts and Storage Get counts.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;IndexWrite&lt;/code&gt; count reported by the transactor is very similar to the MemcachedPut count reported by the peer.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This behavior is consistent with the transactor &lt;em&gt;not&lt;/em&gt; writing newly-indexed segments into memcached eagerly while indexing, which is contrary to the documentation.&lt;/p&gt;
&lt;p&gt;So the question: &lt;strong&gt;Does the transactor &lt;em&gt;really&lt;/em&gt; write index segments to memcached as it is indexing?&lt;/strong&gt;&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/605/does-transactor-eagerly-fill-memcached-with-indexed-segments</guid>
<pubDate>Wed, 07 Apr 2021 15:21:18 +0000</pubDate>
</item>
<item>
<title>What does the memcached/item-too-large log warning mean?</title>
<link>https://ask.datomic.com/index.php/484/what-does-the-memcached-item-too-large-log-warning-mean</link>
<description>&lt;p&gt;I'm seeing a fair frequency of  &lt;code&gt;:memcached/item-too-large&lt;/code&gt; statements in my Datomic logs. &lt;/p&gt;
&lt;p&gt;Is this a size limitation internal to Datomic? If so, could it mean our system is missing out on some cached segments? &lt;/p&gt;
&lt;p&gt;A recent &lt;code&gt;datomic.process-monitor&lt;/code&gt; log statement is showing:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:tid 23,
 :CacheRepair {:lo 1, :count 637, :sum 637, :hi 1},
 :ObjectCacheCount 16634,
 :PeerAcceptNewMsec {:lo 0, :count 348, :sum 1, :hi 1},
 :MemcachedPutSucceededMsec {:lo 0, :count 602, :sum 1276, :hi 177},
 :AvailableMB 5550.0,
 :Memcache {:lo 0, :count 12175, :sum 11537, :hi 1},
 :StorageGetMsec {:lo 2, :count 637, :sum 10089, :hi 831},
 :MemcacheItemTooLarge {:lo 1, :count 4, :sum 4, :hi 1},
 :pid 18,
 :event :metrics,
 :ObjectCache {:lo 0, :count 702668, :sum 690336, :hi 1},
 :MetricsReport {:lo 1, :count 1, :sum 1, :hi 1},
 :PeerFulltextBatch {:lo 1, :count 332, :sum 348, :hi 6},
 :DbAddFulltextMsec {:lo 0, :count 21, :sum 30, :hi 12},
 :MemcachedPutFailedMsec {:lo 0, :count 31, :sum 541, :hi 52},
 :StorageGetBytes {:lo 122, :count 637, :sum 92206399, :hi 31294091}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Which would seem to suggest a high hit rate judging from the &lt;code&gt;:Memcache&lt;/code&gt; &lt;code&gt;:sum / :count&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;Is this something I can fix or would cause issues? &lt;/p&gt;
&lt;p&gt;Thanks!!&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/484/what-does-the-memcached-item-too-large-log-warning-mean</guid>
<pubDate>Tue, 27 Oct 2020 17:54:45 +0000</pubDate>
</item>
</channel>
</rss>