BSC / MSC volatile state / restart handling

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/.

Michael Andersen mia at mob5g.net
Fri Oct 12 09:23:23 UTC 2018


Hi Harald,


>> It gives non-blocking access to the data - directly in-memory. Yet it
also
>> persists the data to disk in the background. So in case the software is
>> restarted, it can pick off exactly where it left its dataset.
>
>AFAICT from a very quick look at the source code, the writing-to-disk is
not
>performed "in the background" but it is rather performed as blocking
write()
>calls in the process/context at which the data is acessed?

We use it in MDB_NOSYNC mode. In practice this seems to result in no waiting
for writes in the user thread at any point. Waiting for reads is never an
issue because the LMDB design does not support reading from disk.

The LMDB benchmarks talk about many thousands of transactions per second. I
can confirm that these benchmarks are not lying.


>So to me, LMDB more looks like BerkeleyDB or SQLite but with a layer of
zero-copy
>memory cache/access at runtime on top of it?

The cool thing about LMDB is that it has no cache, no layers. The "database"
is an area of memory that the LMDB functions help access using key/value
functions.


BR,
Michael A




More information about the OpenBSC mailing list