[TYPO3-core] FYI72: #15497: [Caching framework] Remove tagIndex from memcached and apc backend
Ernesto Baschny [cron IT]
ernst at cron-it.de
Thu Aug 19 09:20:57 CEST 2010
Christian Kuhn schrieb am 19.08.2010 01:35:
> The following patch will be committed in 72 hours if nobody objects:
>
> Type: Performance improvement
>
> Branches: trunk, 4.4, 4.3
>
> BT: http://bugs.typo3.org/view.php?id=15497 [^]
> FLOW3 issue: http://forge.typo3.org/issues/8918 [^] (committed)
>
> Problem:
> The memcached and apc backend implementations currently store this
> key-value "structure" to map our identifier-data-keys relation:
> * identifier -> data
> * identifier -> keys
> * key -> identifiers
> * tagIndex -> All known tags
>
> The tagIndex doesn't have any benefit at all, it just leads to more
> set() and get() calls.
>
> Solution:
> Completely remove tagIndex to save some operations which speeds up the
> backends, unit tests still show green bar.
>
> Numbers:
> Performance tests of memcached backend show that the backend speeds up
> between 10 to 100% by removing the tagIndex. As an example, attached
> images show a test which set()'s a raising number of cache entries with
> a single attached tag to the backend. More numbers can be generated with
> ext:enetcacheanalytics (forge) in v4.
>
> Notes:
> - Memcache is a simple key-value store and not designed to store
> structures of multiple related entries. Our implementation is a misuse,
> which leads to corrupt caches if memcache evicts entries from cache
> (because it needs space for new elements), or if single servers fail in
> a multi server environment.
> - APC backend implementation is pretty much identical to the memcache
> implementation, it's just affected by this change as well, but it's not
> benchmarked on it's own here.
How would one invalidade cache entries by tag then? Doesn't that need to
be documented somewhere (that APC + memcache backends doesn't support
tags), or how does it work then?
Cheers,
Ernesto
More information about the TYPO3-team-core
mailing list