Hello,
I would like to know how frequently OpenSER are cleaning up stale records with the mysql backend of various modules? For instance, active_watchers, location, presentity, watchers etc. mysql tables, or are stale records automatically removed at all? As I found a row in the location table with an "expires" date more than a month ago, but was still not cleaned up today. Or OpenSER takes a different strategy?
This is because we expect to deploy OpenSER on a fairly large network and we are estimating database size and related overhead, and we are a bit worry that accumulation of these stale records may increase our processing costs.
Thank you in advance for any insights.
Regards, Bernard Chan.
Hi Bernard,
for usrloc, what db_mode are you using?
regards, bogdan
Bernard Chan wrote:
Hello,
I would like to know how frequently OpenSER are cleaning up stale records with the mysql backend of various modules? For instance, active_watchers, location, presentity, watchers etc. mysql tables, or are stale records automatically removed at all? As I found a row in the location table with an "expires" date more than a month ago, but was still not cleaned up today. Or OpenSER takes a different strategy?
This is because we expect to deploy OpenSER on a fairly large network and we are estimating database size and related overhead, and we are a bit worry that accumulation of these stale records may increase our processing costs.
Thank you in advance for any insights.
Regards, Bernard Chan.
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
於 一,2007-04-16 於 10:57 +0300,Bogdan-Andrei Iancu 提到:
Hi Bernard,
for usrloc, what db_mode are you using?
Hello bogdan,
In the openser.cfg:
modparam("usrloc", "db_mode", 2) modparam("usrloc", "db_url", "mysql://openser:openserrw@localhost/openser_1_2_0_ipv6")
Thanks.
Regards, Bernard Chan.
Bernard Chan wrote:
Hello,
I would like to know how frequently OpenSER are cleaning up stale records with the mysql backend of various modules? For instance, active_watchers, location, presentity, watchers etc. mysql tables, or are stale records automatically removed at all? As I found a row in the location table with an "expires" date more than a month ago, but was still not cleaned up today. Or OpenSER takes a different strategy?
This is because we expect to deploy OpenSER on a fairly large network and we are estimating database size and related overhead, and we are a bit worry that accumulation of these stale records may increase our processing costs.
Thank you in advance for any insights.
Regards, Bernard Chan.
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi,
In mode 2, the DB is periodically updated from mem. cache - what is removed from mem, is removed from DB also. At startup, the DB is cleaned of old, expired elements.
If you use this db_mode, you should not operate directly on DB, but only via the mem cache (MI functions) to avoid de-synchronization. Even if this happens, after a restart, everything will be cleaned.
regards, bogdan
Bernard Chan wrote:
於 一,2007-04-16 於 10:57 +0300,Bogdan-Andrei Iancu 提到:
Hi Bernard,
for usrloc, what db_mode are you using?
Hello bogdan,
In the openser.cfg:
modparam("usrloc", "db_mode", 2) modparam("usrloc", "db_url", "mysql://openser:openserrw@localhost/openser_1_2_0_ipv6")
Thanks.
Regards, Bernard Chan.
Bernard Chan wrote:
Hello,
I would like to know how frequently OpenSER are cleaning up stale records with the mysql backend of various modules? For instance, active_watchers, location, presentity, watchers etc. mysql tables, or are stale records automatically removed at all? As I found a row in the location table with an "expires" date more than a month ago, but was still not cleaned up today. Or OpenSER takes a different strategy?
This is because we expect to deploy OpenSER on a fairly large network and we are estimating database size and related overhead, and we are a bit worry that accumulation of these stale records may increase our processing costs.
Thank you in advance for any insights.
Regards, Bernard Chan.
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
On Monday 16 April 2007 11:32, Bogdan-Andrei Iancu wrote:
Hi,
In mode 2, the DB is periodically updated from mem. cache - what is removed from mem, is removed from DB also. At startup, the DB is cleaned of old, expired elements.
If you use this db_mode, you should not operate directly on DB, but only via the mem cache (MI functions) to avoid de-synchronization. Even if this happens, after a restart, everything will be cleaned.
This works for small installations, but not if you have an installation with several millions customers and process 700 millions call minutes per month..
Here do you want the smallest downtime as possible, it is not feasible to simple restart openser. The cleanup on startup would probably need also several minutes.
But i don't know what your load requirements are.
Cheers,
Henning
Hi Henning,
do not get me wrong, I was not suggesting to restart just to have that bogus records deleted :).....
the basic idea is that such bogus expired records may appear due improper DB ops (in db_mode 2) and they will not be removed by openser during processing. So you will have to delete them by other means.
regards, bogdan
Henning Westerholt wrote:
On Monday 16 April 2007 11:32, Bogdan-Andrei Iancu wrote:
Hi,
In mode 2, the DB is periodically updated from mem. cache - what is removed from mem, is removed from DB also. At startup, the DB is cleaned of old, expired elements.
If you use this db_mode, you should not operate directly on DB, but only via the mem cache (MI functions) to avoid de-synchronization. Even if this happens, after a restart, everything will be cleaned.
This works for small installations, but not if you have an installation with several millions customers and process 700 millions call minutes per month..
Here do you want the smallest downtime as possible, it is not feasible to simple restart openser. The cleanup on startup would probably need also several minutes.
But i don't know what your load requirements are.
Cheers,
Henning
On Monday 16 April 2007 06:05, Bernard Chan wrote:
I would like to know how frequently OpenSER are cleaning up stale records with the mysql backend of various modules? For instance, active_watchers, location, presentity, watchers etc. mysql tables, or are stale records automatically removed at all? As I found a row in the location table with an "expires" date more than a month ago, but was still not cleaned up today. Or OpenSER takes a different strategy?
Hi Bernard,
Old expired db entries in the usrloc data are only deleted when somebody tries to access them. There don't exist e.g. a background process that cleans up these entries.
This is because we expect to deploy OpenSER on a fairly large network and we are estimating database size and related overhead, and we are a bit worry that accumulation of these stale records may increase our processing costs.
As harddisk space is really cheap today this should normally not be a problem. You could use for example some kind of cron job to drop once a week these stale records.
Cheers,
Henning