[nycphp-talk] session size important?
csnyder
chsnyder at gmail.com
Thu Apr 21 14:57:38 EDT 2005
On 4/21/05, Daniel Krook <krook at us.ibm.com> wrote:
> I saw some example a few months back about
> about the space required by an application that had 20k of session data on
> the file system x number of users x 20 minute time out which brought the
> space needed to 2GB for a modest amount of users.
So the answer is, store as much as you need to, and no more.
But I'm still curious about the performance implications of
serialize() / unserialize() -- should large sessions be broken up into
many rows of a table, so that updates only touch one row and not the
entire structure?
It seems like if you had A LOT of data being stored in the session,
you would be better off putting it into a db and only reading/writing
the rows you need for a given request. Then the only thing stored in
$_SESSION would be the key(s) to those rows...
The disk size requirements don't go away, but processing might be more
efficient.
--
Chris Snyder
http://chxo.com/
More information about the talk
mailing list