Apache Mod-Python - Re: [mod_python] Sessions performance and some numbers

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > April 2005 > Re: [mod_python] Sessions performance and some numbers





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: [mod_python] Sessions performance and some numbers
Jim Gallacher

2005-04-09, 8:45 pm

Barry Pearce wrote:
> I assume that session expiry and subsequent cleanup has been thought
> of...so I wont go into any further detail on that tangent!


Yes, but the proposed code for FileSession could be a problem if there
are a large number of sessions. The cleanup is run once in some random
number of requests approximating 1000.

Psuedo code:

for sess_file in session_file_list:
sess_data = cPickle.load(sess_file)
if session_has_expired(sess_data):
delete_file(sess_file)

Every session file is unpickled to see if the session has expired. This
has GOT to hurt performance when the number of sessions rises to a
significant number.

Regards,
Jim

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com