Igor Canadi c583157d49 MemTableListVersion
Summary:
MemTableListVersion is to MemTableList what Version is to VersionSet. I took almost the same ideas to develop MemTableListVersion. The reason is to have copying std::list done in background, while flushing, rather than in foreground (MultiGet() and NewIterator()) under a mutex! Also, whenever we copied MemTableList, we copied also some MemTableList metadata (flush_requested_, commit_in_progress_, etc.), which was wasteful.

This diff avoids std::list copy under a mutex in both MultiGet() and NewIterator(). I created a small database with some number of immutable memtables, and creating 100.000 iterators in a single-thread (!) decreased from {188739, 215703, 198028} to {154352, 164035, 159817}. A lot of the savings come from code under a mutex, so we should see much higher savings with multiple threads. Creating new iterator is very important to LogDevice team.

I also think this diff will make SuperVersion obsolete for performance reasons. I will try it in the next diff. SuperVersion gave us huge savings on Get() code path, but I think that most of the savings came from copying MemTableList under a mutex. If we had MemTableListVersion, we would never need to copy the entire object (like we still do in NewIterator() and MultiGet())

Test Plan: `make check` works. I will also do `make valgrind_check` before commit

Reviewers: dhruba, haobo, kailiu, sdong, emayanke, tnovak

Reviewed By: kailiu

CC: leveldb

Differential Revision: https://reviews.facebook.net/D15255
2014-01-24 14:52:08 -08:00
..
2013-12-10 10:48:35 +02:00
2014-01-22 10:55:16 -08:00
2014-01-22 10:55:16 -08:00
2013-10-28 17:54:09 -07:00
2014-01-24 11:50:38 -08:00
2014-01-22 10:45:26 -08:00
2014-01-24 14:52:08 -08:00
2014-01-24 14:52:08 -08:00
2013-12-03 11:17:58 -08:00
2013-10-28 17:54:09 -07:00
2013-10-25 08:32:14 -07:00
2014-01-17 12:46:06 -08:00
2014-01-24 14:52:08 -08:00
2014-01-24 14:52:08 -08:00
2014-01-17 12:46:06 -08:00
2013-12-03 12:42:15 -08:00
2013-12-03 12:42:15 -08:00
2014-01-14 15:27:09 -08:00
2014-01-23 16:26:08 -08:00
2014-01-23 16:26:08 -08:00
2014-01-16 14:06:53 -08:00
2014-01-16 14:06:53 -08:00
2014-01-22 10:55:16 -08:00
2014-01-16 14:06:53 -08:00
2014-01-17 12:46:06 -08:00