HalosGhost / pandabin

A self-hostable, simple and fast pastebin written in C
GNU General Public License v3.0
3 stars 0 forks source link

sqlite and concurrency #26

Closed buhman closed 6 years ago

buhman commented 6 years ago

In SQLITE_OPEN_FULLMUTEX/SERIALIZED mode, all database/connection-level operations will block, which severely limits pandabin's concurrency, especially if either the acquire/release cycle and/or sqlite itself end up being slower than everything else.

buhman commented 6 years ago

Related: #25

buhman commented 6 years ago

Related: #27

buhman commented 6 years ago

I tested this, and in NOMUTEX mode, performance does increase slightly, but not significantly enough to make it worthwhile to bother with SQLITE_BUSY handling, IMO.

HalosGhost commented 6 years ago

I figured that might be the case since one of sqlite's priorities is being blindingly fast, and this is a net-bound application.

Thank you for the ground work though!