From openSIPS

About: News0060

About -> News -> DB optimization


Multi-row insert operations

As seen from previous performance tests, database operations are very costly, and have a serious impact on the performance of the proxy, so, whenever possible, we should try to decrease the number of DB queries that OpenSIPS has to do.

The solution (added in 1.7.) is to merge multiple rows into a single query - instead of inserting rows one by one into the database (one row per insert query), OpenSIPS will now cache rows in memory, and only insert them to DB when a certain number of rows have piled up in cache. The flushing of the rows will be done within a single SQL command.

So, as the existing design does not allow asynchronous DB queries (so to optimize the query itself), this new features tries to reduce the number of queries by combining several DB ops in a single query (for insert operations).

Two new parameters have been added to the OpenSIPS core :

The feature has been currently integrated with accounting, siptrace and avpops, as well as with the write-back timers in the dialog and usrloc modules.

For more in detail explanations of how this works and how much does this new feature influence performance.

Retrieved from https://www.opensips.org/About/News0060
Page last modified on May 09, 2013, at 04:42 PM