2. disable asserts. I don't know how this is done in C, but I assume that in
a release build, asserts are off.

Disable asserts() using -DNDEBUG=1. This more than doubles the speed of SQLite. Asserts() are turned off in release builds.

We build sqlite3.08 as follows: ./configure --disable-shared --enable-threadsafe


I removed and rebuilt sqlite3, and rebuilt the test application just to be sure. With a cpu-bound process maxing out each virtual CPU on a hyperthreaded system, the test app ran 10 times in succession without failing. As soon as I killed off 1 or both of the processes, the test runs started to fail in the manner described in my original post. (hardly scientific, but at least highly suspicious)

I also recompiled to turn off NDEBUG and enable assertions (This required editing Makefile.in; using the configure setting --disable-releasemode didn't seem to do anything) and achieved the exact same results.

Mike C asked whether we were using multi-cpu kernels. The answer is, I don't know. All of our kernels are stock, but I was under the impression that at least as far as hyperthreading is concerned, it is the kernel that causes it to appear as though there are two CPUs, so by virtue of the fact that two are visible, multi-cpu support must be present. Nonetheless, I will check into possibly recompiling the kernel on one or more of our test machines.

-Eli



Reply via email to