You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2010/11/17 19:06:21 UTC
svn commit: r1036150 - /tomcat/trunk/webapps/docs/changelog.xml
Author: markt
Date: Wed Nov 17 18:06:20 2010
New Revision: 1036150
URL: http://svn.apache.org/viewvc?rev=1036150&view=rev
Log:
Add recent performance improvements to changelog
Modified:
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1036150&r1=1036149&r2=1036150&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Nov 17 18:06:20 2010
@@ -136,6 +136,10 @@
<bug>50252</bug>: Prevent ClassCastException when using a
<ResourceLink>. Patch provided by Eiji Takahashi. (markt)
</fix>
+ <add>
+ Reduce synchronization in session managers to improve performance of
+ session creation. (markt)
+ </add>
</changelog>
</subsection>
<subsection name="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1036150 - /tomcat/trunk/webapps/docs/changelog.xml
Posted by Tim Funk <fu...@apache.org>.
If the Random number generator is "sufficiently random" could we avoid
the digesting? Or should it be an option?
Since java1.6 has SecureRandom - is its current implementation good
enough to avoid all the extra tricks currently being done and we can
just use that as a default? [Or maybe - we should extend Random and use
that as the default Random instance and move all the initialization
seed/entropy/etc into that class.]
The decision to hash was one made a long time ago (before my time) and
probably was done with respect to not having SecureRandom and other
oddities surrounding the problem of seeding. Do those problems still
exist - or do they exist on some platforms.
-Tim
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1036150 - /tomcat/trunk/webapps/docs/changelog.xml
Posted by Mark Thomas <ma...@apache.org>.
On 18/11/2010 12:45, Remy Maucherat wrote:
> On Wed, 2010-11-17 at 18:06 +0000, markt@apache.org wrote:
>> Author: markt
>> Date: Wed Nov 17 18:06:20 2010
>> New Revision: 1036150
>>
>> URL: http://svn.apache.org/viewvc?rev=1036150&view=rev
>> Log:
>> Add recent performance improvements to changelog
>
> Ok.
>
> So we have two queues that can essentially grow up to the thread count,
> right ?.
Correct. In the highly unlikely event that every single thread in the
container was trying to create a session at the same time and every
thread was at the point where it needed a MessageDigest (or every thread
needed a Random or an InputStream). The chances of that happening are
practically non-existent. And even if it did, it isn't a big deal.
> You have chosen to not use thread locals though (they would
> most likely perform better, at the cost of more memory).
I rejected thread locals because they are harder to clean up and could
lead to memory leaks. The queues will be handled by GC.
> Any testing ?
What do you think the benchmark class is for? The new implementation
performs significantly better than the old one to the point where the
time spent in session creation is in the noise. Could the performance of
the session manager be improved? Almost certainly. Do I think that the
most performance benefit will be obtained by optimising the session
manager (rather than some other part of the processing chain)? No.
> Another question: is it safe on all platforms to concurrently read
> uramdom from a single process ? I suppose it is probably safe, but do we
> know for sure ?
I'll follow-up on Jean-Frederic's post on that.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1036150 - /tomcat/trunk/webapps/docs/changelog.xml
Posted by Mark Thomas <ma...@apache.org>.
On 18/11/2010 13:01, jean-frederic clere wrote:
> On 11/18/2010 01:45 PM, Remy Maucherat wrote:
>> On Wed, 2010-11-17 at 18:06 +0000, markt@apache.org wrote:
>>> Author: markt
>>> Date: Wed Nov 17 18:06:20 2010
>>> New Revision: 1036150
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1036150&view=rev
>>> Log:
>>> Add recent performance improvements to changelog
>>
>> Ok.
>>
>> So we have two queues that can essentially grow up to the thread count,
>> right ?. You have chosen to not use thread locals though (they would
>> most likely perform better, at the cost of more memory). Any testing ?
>>
>> Another question: is it safe on all platforms to concurrently read
>> uramdom from a single process ? I suppose it is probably safe, but do we
>> know for sure ?
>
> For info: http://lkml.org/lkml/2004/11/27/113
Thanks. Interesting thread.
My reading of that thread is:
- this should always have worked
- it didn't
- it was fixed ~6 years ago for 2.6 kernels
That is good enough for me.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1036150 - /tomcat/trunk/webapps/docs/changelog.xml
Posted by jean-frederic clere <jf...@gmail.com>.
On 11/18/2010 01:45 PM, Remy Maucherat wrote:
> On Wed, 2010-11-17 at 18:06 +0000, markt@apache.org wrote:
>> Author: markt
>> Date: Wed Nov 17 18:06:20 2010
>> New Revision: 1036150
>>
>> URL: http://svn.apache.org/viewvc?rev=1036150&view=rev
>> Log:
>> Add recent performance improvements to changelog
>
> Ok.
>
> So we have two queues that can essentially grow up to the thread count,
> right ?. You have chosen to not use thread locals though (they would
> most likely perform better, at the cost of more memory). Any testing ?
>
> Another question: is it safe on all platforms to concurrently read
> uramdom from a single process ? I suppose it is probably safe, but do we
> know for sure ?
For info: http://lkml.org/lkml/2004/11/27/113
Cheers
Jean-Frederic
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1036150 - /tomcat/trunk/webapps/docs/changelog.xml
Posted by Remy Maucherat <re...@apache.org>.
On Wed, 2010-11-17 at 18:06 +0000, markt@apache.org wrote:
> Author: markt
> Date: Wed Nov 17 18:06:20 2010
> New Revision: 1036150
>
> URL: http://svn.apache.org/viewvc?rev=1036150&view=rev
> Log:
> Add recent performance improvements to changelog
Ok.
So we have two queues that can essentially grow up to the thread count,
right ?. You have chosen to not use thread locals though (they would
most likely perform better, at the cost of more memory). Any testing ?
Another question: is it safe on all platforms to concurrently read
uramdom from a single process ? I suppose it is probably safe, but do we
know for sure ?
Rémy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org