[sr-dev] git:master: acc: extended documentation for db_insert_mode parameter
Juha Heinanen
jh at tutpro.com
Wed Apr 16 11:24:08 CEST 2014
Daniel-Constantin Mierla writes:
> >> Default value is 0 (no INSERT DELAYED).
> > daniel,
> >
> > just to clarity, is there some relationship between INSERT DELAYED and
> > async insert?
> No.
good. so perhaps the comment on default value could be (no INSERT
DELAYED nor async insert is used).
> The mechanism behind async insert is as follow:
> - the INSERT query is printed by the process that does the db operation
> - the mysql module instead of sending the query to mysql server, clones
> it in shared memory and sends it to the group of async workers
> - one of the workers reads the task and sends the query to the database
> server
does there need to be a free async worker to serve the request or are
the requests buffered so that the sender of the request is always
immediately free to go on with other business?
> To have the above working, the db_url is also cloned and sent to async
> workers in order to identify the right connection to use. The first idle
> async worker is receiving the task (it is kernel based, the same
> mechanism used for many processes reading on the same UDP socket). You
> have to specify the number of async workers via global parameter
> async_workers:
>
> - http://www.kamailio.org/wiki/cookbooks/devel/core#async_workers
that would have been my next question. if someone only reads
acc/README, it does not mention a need set async_workers > 0 in order to
benefit from db_insert_mode=2.
-- juha
More information about the sr-dev
mailing list