-
Type: Task
-
Resolution: Done
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:
I believe I have at least part of an explanation about single-threaded performance. I turned on statistics, stats logging and added a couple new ones. When running pmp on mongod with WT and running a single thread, any time I saw a thread actually in the WT library, it was in pwrite, via the logging subsystem. In 2 and 4 thread runs, if I ever saw it in WT, it was yielding in log_release. The logging subsystem is enabled, but sync is none, so we do not call fsync on each commit.
The bottom line is that with 1 client thread, the logging code is also single threaded and calls *log_direct_write 100% of the time. That means *log_fill is called with direct=1 and that forces it to call the write() system call every time. When I run with 2 or more threads, logging quickly uses the consolidation code and nearly 100% of the calls to __log_fill have direct=0 and take the memcpy path.
agorrod added the direct path back in 11508ba37b4 and 45ac39bafd5d. I need to reread all that code. I think the new stats are probably keepers though.