Nagare resource consumption

6 views
Skip to first unread message

Pavel Kaygorodov

unread,
Mar 29, 2010, 11:02:01 AM3/29/10
to nagare...@googlegroups.com
Good day!

How much of resources (first of all, amount of memory) will consume Nagare per session? As I can see, it stores all continuations for all page reloads, so if I use "back" button, previous state is respawned from the past. Does it means, what Nagare application will eat more and more memory, while user works with it? Which is freeing policy for old continuations in Nagare?

WIth best regards,
  Pavel.

apoirier

unread,
Mar 29, 2010, 11:59:23 AM3/29/10
to Nagare users
Hi,

On 29 mar, 17:02, Pavel Kaygorodov <pavel.kaygoro...@gmail.com> wrote:
> Good day!
>
> How much of resources (first of all, amount of memory) will consume Nagare
> per session?

By default, the whole objects graph is serialized into the session, so
the amount of memory used depends on how many objects / components
your application is build of.

> As I can see, it stores all continuations for all page reloads,
> so if I use "back" button, previous state is respawned from the past.

Yes, that's right. When a new user accesses your application, a new
`session` is created. Then, each time a page is generated for this
user, the serialization of the objects graph is kept in a new `state`
associated to his session.

> Does it means, what Nagare application will eat more and more memory, while user
> works with it? Which is freeing policy for old continuations in Nagare?

When you're using the `standalone` sessions manager, the sessions and
states are kept in memory in LRU (Least Recently Used)) lists, by
Nagare. When the maximum number of sessions or states by session are
reached, the oldest ones are deleted. In the configuration file of
your application you can set how many sessions and states per session
you want to kept:

[sessions]
type = standalone
nb_sessions = 10000
nb_states = 20

(10000 and 20 are the default values)


When you're using the `memcached` sessions manager, the sessions and
state are sent to an external memcache server:

[sessions]
type = memcache

There are also kept in a LRU list there but, in this case, the `-m`
option of memcached is used to indicate how many amount of memory is
allocated to all the sessions / states.

> WIth best regards,
> Pavel.

Best regards

Reply all
Reply to author
Forward
0 new messages