Hello Tibor,

I didn't you write anything about the result of your advices:

[...]
> If you can afford to (1) stop the service for a short time, (2) force
> logout on every user, and (3) delete all temporary baskets that your
> guest users might have created even recently, then you can run sessiongc
> in the following way:
>
>   $ sudo apachectl stop
>   $ echo "TRUNCATE session" | /opt/cds-invenio/bin/dbexec
>   $ echo "DELETE FROM user WHERE email=''" | /opt/cds-invenio/bin/dbexec
>   $ sudo apachectl start
>   $ sessiongc
>
> e.g. once per week every Sunday at 23:30.  This should be much better
> for you than running sessiongc in the usual way.

I wasn't been able to implmenent it until this weekend.  After a couple
of weeks of not executing any sessiongc script, the timings this
Saturday were:


 Sat Sep 20 03:12:52 CEST 2008
 + sudo /etc/init.d/apache2 stop
 Stopping web server (apache2)...[Sat Sep 20 03:12:53 2008] [warn] 
NameVirtualHost ddd.uab.es:0 has no VirtualHosts
 .
 + echo 'TRUNCATE session'
 + dbexec
 + echo 'DELETE FROM user WHERE email='\'''\'''
 + dbexec
 + sudo /etc/init.d/apache2 start
 Starting web server (apache2)...[Sat Sep 20 03:17:48 2008]
 .
 + sessiongc

 GUEST USER SESSIONS GARBAGE COLLECTOR STARTED: Sat Sep 20 03:17:59 2008.

 - deleting expired sessions
 - deleting guest users without session
 - deleting user_queries referencing non-existent users
 - deleting queries not attached to any user
 - deleting baskets not owned by any user
 - deleting alerts not owned by any user

 STATISTICS - DELETED DATA:
 -       0 sessions.
 -       0 users.
 -  585742 user_queries.
 -  550164 queries.
 -     155 baskets.
 -     155 user_baskets.
 -     120 basket_records.
 -       0 basket_external_records.
 -       0 basket_external_formats.
 -       0 basket_comments.
 -       0 user_query_baskets.

 GUEST USER SESSIONS GARBAGE COLLECTOR FINISHED: Sat Sep 20 07:31:55 2008.

 EXECUTION LASTED 15236.71 SECONDS.

 + date
 Sat Sep 20 07:31:55 CEST 2008

 real   259m3.498s
 user   3m23.465s
 sys    0m28.674s


That means about the same 3-4 hours of cleaning up, but in this
particular case, we have improved it because it happens only once, on
weekend, instead of daily, but cleaning up a couple of weeks of data.
We should expect better timings when executed weekly.

> As I mentioned, this won't be needed after you upgrade to the
> forthcoming CDS Invenio v0.99.1.

Sure, but we haven't stablished a calendar here at UAB.  May we ask
whether we should wait for a mythical 1.0, or we'd better do it now.
I'm asking that because for this 0.99 there is a lot of work dumping,
converting and reloading the database, and reindexing everything, and
I'd like to know if all this work will be valid for the next release.

Thanks again,

Ferran

Reply via email to