Bug #49189
Session storage has poor performance for hundreds of sessions
Status: | Resolved | Start date: | 2013-06-17 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Robert Lemke | % Done: | 100% |
|
Category: | Session | |||
Target version: | TYPO3 Flow Base Distribution - 2.0 | |||
PHP Version: | 5.4 | Complexity: | medium | |
Has patch: | No | Affected Flow version: | Git master |
Description
If an application contains hundreds of simultaneous sessions, the garbage collection mechanism performs poorly which can eventually result in an unresponsive application.
The root cause for this is the way session entries are retrieved from the cache (in order to check if they need to be removed): in its current implementation, entries with meta information and those acting as storage entries reside in the same cache. Therefore, in order to iterate over the meta entries only, Flow needs to fetch cache entries by tag. Most cache backends will not be able to deliver cache entries by tags with a reasonable speed, thus the complexity for this operation is quite high.
The solution would be to split up caches into a meta cache and a storage cache. Given this, the session garbage collector would be able to iterate over all entries of the meta cache without having to use the find-by-tag mechanism.
Related issues
Associated revisions
[BUGFIX] Session storage has poor performance for hundreds of sessions
Fixes an issue with the storage backend for sessions which resulted in
a bad overall performance when hundreds of sessions were active
simultaneously. The improved implementation is now based on two separate
cache storages and a new garbage collector which allows for more fine
grained tuning.
If you previously used a different than the default cache backend for
sessions, you will need to adjust your configuration because this
implementation is based on two distinct cache backend configurations
(see updated Caches.yaml).
The option name for setting the garbage collection probability has
changed: the settings now come with a dedicated section for garbage
collection which contains the probability and, added by this patch, the
maximum number of old sessions which may be removed by the garbage
collector during one invocation.
You need to flush caches with --force after applying this change set.
Change-Id: I08578b39bab06ffb406a95f289eeb170542f92cf
Fixes: #49189
Resolves: #49190
Releases: master, 2.0
[BUGFIX] Session storage has poor performance for hundreds of sessions
Fixes an issue with the storage backend for sessions which resulted in
a bad overall performance when hundreds of sessions were active
simultaneously. The improved implementation is now based on two separate
cache storages and a new garbage collector which allows for more fine
grained tuning.
If you previously used a different than the default cache backend for
sessions, you will need to adjust your configuration because this
implementation is based on two distinct cache backend configurations
(see updated Caches.yaml).
The option name for setting the garbage collection probability has
changed: the settings now come with a dedicated section for garbage
collection which contains the probability and, added by this patch, the
maximum number of old sessions which may be removed by the garbage
collector during one invocation.
You need to flush caches with --force after applying this change set.
Change-Id: I08578b39bab06ffb406a95f289eeb170542f92cf
Fixes: #49189
Resolves: #49190
Releases: master, 2.0
History
#1 Updated by Gerrit Code Review about 2 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21476
#2 Updated by Gerrit Code Review about 2 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21476
#3 Updated by Gerrit Code Review about 2 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21476
#4 Updated by Gerrit Code Review about 2 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21476
#5 Updated by Gerrit Code Review about 2 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21476
#6 Updated by Anonymous about 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d84108f8e6a52c946f8465793a41ca4e4fe26081.
#7 Updated by Gerrit Code Review about 2 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch 2.0 has been pushed to the review server.
It is available at https://review.typo3.org/21507
#8 Updated by Anonymous about 2 years ago
- Status changed from Under Review to Resolved
Applied in changeset 54d08ed5606ce4d87c63f0d571eeb4837679322b.