]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/log
rocksdb.git
13 years agoImproved readhotwriterandom db_bench benchmark hotcold
Kosie van der Merwe [Fri, 15 Feb 2013 20:11:03 +0000 (12:11 -0800)]
Improved readhotwriterandom db_bench benchmark

Summary: readhotwriterandom now generates a certain number of keys randomly. This number is a percentage (determined by hotkeyspercentage) of --num. Then when a key is needed one of the keys in that list is chosen randomly.

Test Plan: Ran db_bench with small --num parameter to see if the keys are random and that we only use a subset of the "hot" keys.

Reviewers: vamsi, dhruba

Reviewed By: vamsi

CC: leveldb
Differential Revision: https://reviews.facebook.net/D8613

13 years agoRemoved Cache from metrics flow for Block::MetricsIter to DBImpl
Kosie van der Merwe [Fri, 15 Feb 2013 20:10:00 +0000 (12:10 -0800)]
Removed Cache from metrics flow for Block::MetricsIter to DBImpl

Summary:
Before this patch we had to send metrics to `Cache`, which then sent the metrics to `DBImpl`. Now we directly send them to `DBImpl`, by the use of a pointer to a pointer of a `BlockMetrics` instance. We can do this safely and without additional locks because:

* `Block::MetricsIter` runs in the same thread as `DBImpl::Get()` (in which the `BlockMetrics` pointer resides)
* `DBImpl::Get()` locks `DBImpl` again after the `Block::MetricsIter` is destroyed, so we don't have to do an additional lock.

Test Plan: make check

Reviewers: vamsi, dhruba

Reviewed By: vamsi

CC: leveldb
Differential Revision: https://reviews.facebook.net/D8583

13 years agoHotcold: Added ability to select which levels record metrics
Kosie van der Merwe [Fri, 15 Feb 2013 20:06:34 +0000 (12:06 -0800)]
Hotcold: Added ability to select which levels record metrics

Summary: Added an option to `Options` to specify which levels have metrics recorded and used that option in `Version::Get()` to stop metrics being recorded for wrong levels and in `DBImpl` to stop `DoCompactionWork()` trying to split on hotcold for levels where no metrics are available.

Test Plan: make check

Reviewers: vamsi, dhruba

Reviewed By: vamsi

CC: leveldb
Differential Revision: https://reviews.facebook.net/D8511

13 years agoFixed `Block::MetricsIter` to only create metrics on successful seek and added readho...
Kosie van der Merwe [Fri, 15 Feb 2013 20:05:04 +0000 (12:05 -0800)]
Fixed `Block::MetricsIter` to only create metrics on successful seek and added readhotwriterandom to db_bench

Summary:
Changed `Block::MetricsIter` to only record metrics when the seek finds the value the user was looking for.

Added extra benchmark to db_bench.

Test Plan: make check

Reviewers: vamsi, dhruba

Reviewed By: vamsi

CC: leveldb
Differential Revision: https://reviews.facebook.net/D8433

13 years agoHotcold: Removed Table from metrics flow path and now only create BlockMetrics in...
Kosie van der Merwe [Fri, 15 Feb 2013 20:03:30 +0000 (12:03 -0800)]
Hotcold: Removed Table from metrics flow path and now only create BlockMetrics in Block::MetricsIter

Summary: Metrics no longer pass through `Table` to the cache and instead go directly from `Block::MetricsIter`. Additionally `BlockMetrics` is now only created when a `Seek()` is performed.

Test Plan: make check

Reviewers: vamsi, dhruba

Reviewed By: vamsi

CC: leveldb
Differential Revision: https://reviews.facebook.net/D8427

13 years agoHotcold: Short circuiting behaviour for file lookups when finding key in hot file
Kosie van der Merwe [Fri, 15 Feb 2013 20:02:15 +0000 (12:02 -0800)]
Hotcold: Short circuiting behaviour for file lookups when finding key in hot file

Summary:
Before this update both hot and cold file had to be queried in order to get the latest value for a given key. Now if the key is found in the hot file then we know the latest value is in the hot file.

Changed compaction to not allow a user key to have a record with a smaller sequence number in the hot file if there is a record with a larger sequence number in the cold file.

Added short circuiting to `Version::Get()` to assume that if a key is found in a newer file then it has a newer sequence number.

Test Plan:
`make check`

ran `db_bench` compiled with assertions on and in hot cold mode.

Reviewers: vamsi, dhruba

Reviewed By: vamsi

CC: leveldb
Differential Revision: https://reviews.facebook.net/D8451

13 years agoMerged in master
Kosie van der Merwe [Fri, 1 Feb 2013 21:10:15 +0000 (13:10 -0800)]
Merged in master

13 years agoHotcold: Changing compaction based on hotness of record.
Kosie van der Merwe [Fri, 15 Feb 2013 19:51:50 +0000 (11:51 -0800)]
Hotcold: Changing compaction based on hotness of record.

Summary:
Changed `DoCompactionWork()` to output multiple files and imported https://reviews.facebook.net/D8025 (Ideally all issues with version_set.h, version_set.cc and version_set_test.cc should be brought up there so I can keep that patch up to date and we can decide whether to mainline it separately) so we can handle overlapping files in level 1+.

Added code to determine whether a record is hot or cold given the metrics DB and an iterator on the database (which allows us to get all the necessary data in order to lookup the hotness)

Test Plan:
make check

db_bench --benchmarks=readrandomwriterandom --hotcold=1

Reviewers: dhruba, vamsi, chip, heyongqiang

Reviewed By: vamsi

CC: leveldb
Differential Revision: https://reviews.facebook.net/D8163

13 years agoMerge branch 'master' into hotcold
Kosie van der Merwe [Thu, 24 Jan 2013 22:39:16 +0000 (14:39 -0800)]
Merge branch 'master' into hotcold

13 years agoFixed didIO not being set with no block_cache
Kosie van der Merwe [Wed, 23 Jan 2013 20:49:10 +0000 (12:49 -0800)]
Fixed didIO not being set with no block_cache

Summary:
In `Table::BlockReader()` when there was no block cache `didIO` was not set.

This didn't seem to matter as `didIO` is only used to trigger seek compactions. However, I would like it if someone else could check that is the case.

Test Plan: `make check OPT="-g -O3"`

Reviewers: dhruba, vamsi

Reviewed By: dhruba

CC: leveldb
Differential Revision: https://reviews.facebook.net/D8133

13 years agoadded notice to db_bench that more bg threads are added when hotcold is on.
Kosie van der Merwe [Wed, 9 Jan 2013 22:56:47 +0000 (14:56 -0800)]
added notice to db_bench that more bg threads are added when hotcold is on.