jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shaun Barriball" <sbarr...@yahoo.co.uk>
Subject RE: Profiling shows Session management to be a hotspot - session pooling etc
Date Tue, 27 Mar 2007 11:27:02 GMT
Avim wrote "If you have no write operations, you can use a single session
for the hole application(!?)"

2 issues I'm aware of if we used a single session, say cached at the
ServletContext level:

1) I've read various threads which imply that a Session should only be
accessed via a single thread, and therefore a session cannot be shared
across parallel requests.

2) the data does change frequently therefore creating a new session ensures
its up to date. I guess if point 1) isn't an issue we could consider using a
SingleSession and periodically called refresh() on it.

If anyone can put my right on the above I'd appreciate it.
Regards,
Shaun.


-----Original Message-----
From: avim [mailto:avi.moradi@timetoknow.org] 
Sent: 27 March 2007 12:15
To: users@jackrabbit.apache.org
Subject: Re: Profiling shows Session management to be a hotspot - session
pooling etc




Shaun Barriball wrote:
> 
> Hi all,
> We're currently CPU profiling an application which uses the 
> SessionInView pattern to create a new JCR session (with JackRabbit) for
each request.
> 
> Profiling shows that around:
>  - 11.4% of the CPU time is in releaseSession(). In particular around 
> 5% of this is in ItemManager.evictItem().
>  - 0.08% of the CPU time is in getSession()
> 
> For each request the application is just reading a set of nodes (upto 
> around
> 100) to generate a web page. We're using JackRabbit 1.2.1 with Oracle.
> 
> Any recommendations for how to resolve this overhead?
>  - should we consider pooling sessions?
>  - any way to optimise the session usage given the nodes are all 
> read-only?
> If you have no write operations, you can use a single session for the 
> hole
> application(!?)
> All help appreciated.
> Regards,
> Shaun.
> 
> 
> 		
> ___________________________________________________________
> All New Yahoo! Mail – Tired of Vi@gr@! come-ons? Let our SpamGuard 
> protect you. http://uk.docs.yahoo.com/nowyoucan.html
> 
> 

--
View this message in context:
http://www.nabble.com/Profiling-shows-Session-management-to-be-a-hotspot---s
ession-pooling-etc-tf3472134.html#a9690383
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


		
___________________________________________________________ 
Inbox full of spam? Get leading spam protection and 1GB storage with All New Yahoo! Mail.
http://uk.docs.yahoo.com/nowyoucan.html

Mime
View raw message