Hello ! You can check the behavior of sqlite3 in a multi thread environment with this program:
https://gist.github.com/mingodad/79225c88f8dce0f174f5 I did it to test how fast sqlite3 can be on a system (cpu/memory/threads) and with it you can from the command line change the following parameters: data_size=256 num_threads=2 use_wal=1 use_synchronous=0 busy_retry=200 busy_retry_useconds=100000 start_loop_useconds=0 mid_loop_useconds=0 use_memory_db=0 And you'll get an output like this: Update rate: total=458547, last_total=423241, rate=35306, avg1=17653, avg2=38212 Update busy rate: total=124, last_total=113, rate=11, avg1=5, avg2=10 Update failed rate: total=0, last_total=0, rate=0, avg1=0, avg2=0 Read busy rate: total=0, last_total=0, rate=0, avg1=0, avg2=0 Read failed rate: total=0, last_total=0, rate=0, avg1=0, avg2=0 Where : Update rate = How many updates are done per second Update busy rate = How many times sqlite returned SQLITE_BUSY (busy_retry_useconds) Update failed rate = How many times we've failed our timeout (busy_retry * busy_retry_useconds) Read busy rate = Same as "Update busy rate" but for reads Read failed rate = Same as "Update failed rate" but for reads ? - total = cumulative total from the beginning of the program execution ? - last_total = the previous total ? - rate = number of operations in the last second ? - avg1 = average of operations by thread on the last second ? - avg2 = average of operations by second since the begining of the program execution ? I hope it can help you and others to understand/tune sqlite for a specific use case. Cheers !