forked from memcached/memcached
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix LRU contention for first minute of uptime
Noticed in benchmarks that memcached was slow for the first minute. ~350k gets/sec max, then it would jump up to millions/sec. if (it->time < current_time - ITEM_UPDATE_INTERVAL) { current_time starts at 2, which then underflows toward 4 billion, which is larger than it->time, so all fetches for the first minute require shuffling the LRU. Which happens under a global lock. This probably goofed up all short-term benchmarks, and potentially slowed down high traffic instances which were recently restarted. Unfortunately this means the tests no longer exercise item_update(), so some more work is necessary.
- Loading branch information
Showing
3 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters