[asterisk-dev] How to improve astdb? Any ideas?

Stefan Schmidt sst at sil.at
Mon Sep 6 03:28:58 CDT 2010


Am 06.09.2010 09:20, schrieb Benny Amorsen:
> Stefan Schmidt <sst at sil.at> writes:
> 
>> the problem is that syncing the astdb to the disk will needs minimum 2ms
>> and up to 40 ms with an big amount of entries in the database. In this
>> time no incoming package is read so this will cause some really bad
>> things to the system like every peer get unreachable.
> 
> Why does all of Asterisk wait for the astdb sync? Can't the other
> threads keep going?
> 
> 
> /Benny
> 
> 
sorry if i said this not clearly.

Not all threads are waiting only the one which does the astdb call.

for example sip channel:
a register msg is received
asterisk does its checks of secret, acl and so on
then call astdb_put to write the data into the astdb (have a look at
"database show" you will see sip peer register contacts in there)
in astdb_put the astdb->sync function is called to ensure data is really
saved to disk which take some time.
until astdb->sync is finished no other sip package is read, or schedule
is launched.


best regards

steve



More information about the asterisk-dev mailing list