Hi,

On 30.09.2010 09:31, Ian Boston wrote:
> 
> On 30 Sep 2010, at 07:23, Felix Meschberger wrote:
> 
>> Hi,
>>
>> On 29.09.2010 22:00, Ian Boston wrote:
>>> Hi,
>>> Is it possible to register a filter before the SlingMainServlet ?
>>
>> Short answer: No.
>>
>> Longer answer: The SlingMainServlet (or actually the
>> SlingRequestProcessorImpl these days) is controlling the execution of
>> the filters and those are only called once the SlingHttpServletRequest
>> and ..Response objects have been properly set up including resource and
>> script to be called.
> 
> 
> Ok, (& btw, thanks for the other pointers).
> The reason I want to register the filter before Sling is the caching one 
> captures certain public responses before any processing and so should be a) 
> highly concurrent with the right cache and b) lightweight.

Yes, I agree, that caching should be done as early as possible .... And
to get most performance doing it before resolving the request resource
and the servlet/script is probably a must.

This reminds me of other discussions we had around caching and the
question, whether it would be usefull to have a hook in the
SlingMainServlet (or its helpers) to plug cache functionality ?

> 
> I dont know if its my machine or the way of testing but at the moment I can 
> only get a max of 600 request per seconds on a json properties GET, flat 
> regardless of concurrency out of sling. If I test Tomcat 6 on a html page I 
> get 6K/s and the throughput appears to have some relationship to the 
> concurrency of the requests. 

I don't want to start finger-pointing, but ...

It looks like Jackrabbit has some issues with concurrent reads.

Setting up a test with a Java profiler allowing to measure thread
contention (synchronization stuff) would probably show a hint (IIRC
YourKit Profiler has such functionality).

Probably we have such contentions in Sling, too (would not surprise me),
and we should work on that.

Regards
Felix

> 
> I am going to try and trace through the code base to see if there is anything 
> that could be making the requests single-threaded, but as a quick fix I 
> wanted to get the caching filter right out in front.
> 
> Now, its possible that some of the mods I have are causing the problem, so, 
> here is a dumb question:
> 
> Has anyone tested Sling OOTB for GET concurrency and if so, do they see 
> single threaded behaviour or does it show linear ramp up upto the number of 
> cores ?
> 
> 
> Ian
> 
> (I am assuming that Jetty is highly concurrent, but I might need to check 
> that in a PAX environment).
> 
> 
> 

Reply via email to