Igor Canadi
82e5c842b6
Fix bad performance in debug mode
Summary:
See github issue 574: https://github.com/facebook/rocksdb/issues/574
Basically when we're running in DEBUG mode we're calling `usleep(0)` on
every mutex lock. I bisected the issue to
https://reviews.facebook.net/D36963. Instead of calling sleep(0), this
diff just avoids calling SleepForMicroseconds() when delay is not set.
Test Plan:
bpl=10485760;overlap=10;mcz=2;del=300000000;levels=2;ctrig=10000000; delay=10000000; stop=10000000; wbn=30; mbc=20; mb=1073741824;wbs=268435456; dds=1; sync=0; r=100000; t=1; vs=800; bs=65536; cs=1048576; of=500000; si=1000000; ./db_bench --benchmarks=fillrandom --disable_seek_compaction=1 --mmap_read=0 --statistics=1 --histogram=1 --num=$r --threads=$t --value_size=$vs --block_size=$bs --cache_size=$cs --bloom_bits=10 --cache_numshardbits=4 --open_files=$of --verify_checksum=1 --db=/tmp/rdb10test --sync=$sync --disable_wal=1 --compression_type=snappy --stats_interval=$si --compression_ratio=0.5 --disable_data_sync=$dds --write_buffer_size=$wbs --target_file_size_base=$mb --max_write_buffer_number=$wbn --max_background_compactions=$mbc --level0_file_num_compaction_trigger=$ctrig --level0_slowdown_writes_trigger=$delay --level0_stop_writes_trigger=$stop --num_levels=$levels --delete_obsolete_files_period_micros=$del --min_level_to_compress=$mcz --max_grandparent_overlap_factor=$overlap --stats_per_interval=1 --max_bytes_for_level_base=$bpl --memtablerep=vector --use_existing_db=0 --disable_auto_compactions=1 --source_compaction_factor=10000000 | grep ops
Before:
fillrandom : 117.525 micros/op 8508 ops/sec; 6.6 MB/s
After:
fillrandom : 1.283 micros/op 779502 ops/sec; 606.6 MB/s
Reviewers: rven, yhchiang, sdong
Reviewed By: sdong
Subscribers: meyering, dhruba, leveldb
Differential Revision: https://reviews.facebook.net/D36963
2015-04-13 15:59:29 -07:00
..
2014-12-02 12:09:20 -08:00
2015-03-17 14:08:00 -07:00
2014-11-21 14:11:40 -08:00
2015-03-12 21:13:53 +03:00
2015-03-17 14:08:00 -07:00
2015-02-06 10:37:45 -08:00
2015-02-26 11:28:41 -08:00
2015-03-19 17:29:37 -07:00
2014-12-04 11:41:56 -08:00
2014-11-11 16:47:22 -05:00
2014-11-24 20:44:49 -08:00
2015-02-20 11:07:21 -08:00
2015-03-17 14:08:00 -07:00
2014-11-11 16:47:22 -05:00
2015-02-19 13:11:10 -08:00
2014-11-07 15:04:30 -08:00
2015-03-19 17:29:37 -07:00
2015-03-17 15:04:37 -07:00
2015-03-17 14:08:00 -07:00
2014-08-19 06:48:21 -07:00
2014-11-11 16:47:22 -05:00
2015-02-26 11:28:41 -08:00
2015-01-14 16:24:24 -08:00
2015-03-17 14:08:00 -07:00
2014-11-11 16:47:22 -05:00
2013-10-16 17:48:41 -07:00
2014-11-13 14:39:30 -05:00
2014-11-13 14:39:30 -05:00
2015-03-17 14:08:00 -07:00
2014-12-02 12:09:20 -08:00
2014-12-02 12:09:20 -08:00
2014-11-24 20:44:49 -08:00
2015-03-18 11:26:10 -07:00
2015-03-19 17:29:37 -07:00
2015-02-06 10:37:45 -08:00
2015-03-17 14:08:00 -07:00
2015-03-13 10:29:32 -07:00
2015-03-13 10:29:32 -07:00
2014-11-14 11:38:26 -08:00
2014-11-14 11:38:26 -08:00
2015-03-17 14:08:00 -07:00
2013-10-16 17:48:41 -07:00
2014-12-02 12:09:20 -08:00
2014-12-02 12:09:20 -08:00
2015-02-26 11:28:41 -08:00
2014-12-02 12:09:20 -08:00
2015-02-26 11:28:41 -08:00
2014-12-02 12:09:20 -08:00
2014-11-11 16:47:22 -05:00
2014-11-20 10:49:32 -08:00
2015-03-17 14:08:00 -07:00
2014-11-13 14:39:30 -05:00
2014-11-13 14:39:30 -05:00
2015-02-09 17:55:12 -08:00
2015-02-04 21:39:45 -08:00
2014-08-28 12:46:05 -04:00
2014-08-28 12:46:05 -04:00
2015-03-16 18:08:59 -07:00
2015-03-17 15:04:37 -07:00
2015-03-16 18:08:59 -07:00
2014-12-12 17:50:36 -08:00
2014-09-23 16:56:34 -07:00
2015-02-26 15:19:17 -08:00
2014-05-09 08:41:02 -07:00
2015-03-14 15:12:41 -07:00
2015-03-14 15:12:41 -07:00
2015-03-17 14:08:00 -07:00
2015-03-17 14:08:00 -07:00
2015-02-26 11:28:41 -08:00
2015-03-17 14:08:00 -07:00
2015-02-26 11:28:41 -08:00
2015-02-26 11:28:41 -08:00
2013-10-16 17:48:41 -07:00
2014-11-11 16:47:22 -05:00
2015-03-02 22:40:41 -08:00
2015-03-02 22:40:41 -08:00
2014-06-16 15:41:46 -07:00
2014-12-04 13:56:14 -08:00
2015-03-17 15:04:37 -07:00
2014-11-18 22:21:02 +01:00
2015-03-19 17:06:02 -07:00
2015-04-09 21:32:03 -07:00
2014-09-02 12:04:22 -07:00
2015-03-24 14:42:04 -07:00
2015-02-26 11:28:41 -08:00
2013-10-16 17:48:41 -07:00
2015-03-18 15:35:55 -07:00
2015-03-18 15:35:55 -07:00
2015-03-18 15:35:55 -07:00
2014-09-04 17:40:41 -07:00
2015-02-13 15:10:47 -08:00
2014-12-02 12:09:20 -08:00
2015-03-17 14:08:00 -07:00
2015-02-26 11:28:41 -08:00
2015-03-17 14:08:00 -07:00
2015-02-25 16:34:26 -08:00
2015-03-23 14:30:11 -07:00
2015-01-23 18:10:52 -08:00
2014-07-28 12:10:49 -07:00
2014-11-11 16:47:22 -05:00
2013-12-03 12:42:15 -08:00
2014-07-28 12:22:37 -07:00
2014-11-21 11:05:28 -05:00
2014-11-24 20:44:49 -08:00
2015-03-02 22:40:41 -08:00
2015-03-02 22:40:41 -08:00
2015-03-19 17:32:43 -07:00
2015-03-19 17:32:43 -07:00
2014-09-08 22:24:40 -07:00
2015-02-26 11:28:41 -08:00
2015-03-17 14:08:00 -07:00
2015-03-17 14:08:00 -07:00
2015-01-27 13:56:03 -08:00
2014-10-21 17:28:31 -07:00
2015-03-13 10:45:40 -07:00
2015-03-24 14:52:59 -07:00
2015-01-13 00:04:08 -08:00
2015-03-24 11:32:25 -07:00
2015-03-24 11:32:25 -07:00
2015-04-13 15:59:29 -07:00
2015-03-24 11:32:25 -07:00
2015-03-13 18:09:01 -07:00
2014-12-02 12:09:20 -08:00
2015-04-09 21:32:03 -07:00
2015-04-09 21:32:03 -07:00
2015-03-12 12:07:10 -07:00
2015-03-12 12:07:10 -07:00