Project

General

Profile

Actions

Bug #23402

closed

[Caching framework] Remove tagIndex from memcached and apc backend

Added by Christian Kuhn over 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Caching
Target version:
-
Start date:
2010-08-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

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 currenty 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:
Completly 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 is not benchmarked on it's own here.

(issue imported from #M15497)


Files

Actions

Also available in: Atom PDF