[PATCH] db: use WAL journaling mode for higher concurrency

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Holger Hans Peter Freyther holger at freyther.de
Sat Feb 22 08:48:39 UTC 2014


On Sat, Feb 22, 2014 at 12:19:09PM +0400, Alexey Shamrin wrote:

Hi,


> That said, it's not practical to never touch DB from outside and use
> only OpenBSC VTY interface. The latter doesn't allow custom SQL
> queries. Fortunately, the workaround is simple: issue `PRAGMA
> journal_mode = WAL` from `sqlite3` command once, when deploying
> OpenBSC.

To ask the other way around. Which queries do yo run? Do you UPDATE
subscriber structures too?


> Yes, but switching the async interface alone won't fix the 'database
> is locked' problem. Only if we also switch to MySQL/Postgres. What do
> you mean by "use the DB APIs directly"?

My understanding is that real and bigger deployments should use a database
server like Postgres. Currently we are using the libdbi and it doesn't
really work well with SQLite[1]. For every column we SELECT libdbi will
issue a PRAGMA to determine the type every time we query.

What I say is we need fixes and not work-arounds. The first step is
making the code aware that a database lookup can take time.

holger


[1] http://comments.gmane.org/gmane.comp.db.libdbi.drivers/498




More information about the OpenBSC mailing list