You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Leif Mortenson <le...@silveregg.co.jp> on 2002/02/02 18:25:14 UTC

New Pool Performance tests.

	I just checked in some new profile tests comparing the various pool
implementations.  They are quite useful for showing how the various
pools stand up against each other.

 	They show that in Multi Threaded contexts, the ResourceLimitingPool is
the fastest.  While in Single Threaded contexts,  the SingleThreadedPool
is the fastest as expected.

org.apache.avalon.excalibur.pool.test.SingleThreadedPoolComparisonProfile
org.apache.avalon.excalibur.pool.test.MultiThreadedPoolComparisonProfile

	The following command will run them:
build -Djunit.test=**/pool/test/*ThreadedPoolComparisonProfile.class
test-subset


Each test case kicks out output like the following.  Each test compares
creating 50000 objects from scratch, doing 50000 gets and puts using a
comparison pool and 50000 gets and puts using the ResorceLimitingPool.
The "Max10_Gets20" portion of the test names means that the pools are
configured with their max value set to 10, but each loop will get 20
Poolables.  That means that half of the gets/puts are not pooled.

---
Test Case:
SoftResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets20_LargePoolables
     Unpooled time = 10063ms. to use 50000 objects.
     SoftResourceLimitingPool time = 11422ms. to use 50000 objects, 20
at a time.
     ResourceLimitingPool time = 10906ms. to use 50000 objects, 20 at a
time.
  => SoftResourceLimitingPool is 0.88 X as fast as not pooling.
  => ResourceLimitingPool is 0.92 X as fast as not pooling.
  => ResourceLimitingPool is 1.04 X as fast as SoftResourceLimitingPool.
Test Case:
SoftResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets10_LargePoolables
     Unpooled time = 11078ms. to use 50000 objects.
     SoftResourceLimitingPool time = 953ms. to use 50000 objects, 10 at
a time.
     ResourceLimitingPool time = 204ms. to use 50000 objects, 10 at a time.
  => SoftResourceLimitingPool is 11.62 X as fast as not pooling.
  => ResourceLimitingPool is 54.3 X as fast as not pooling.
  => ResourceLimitingPool is 4.67 X as fast as SoftResourceLimitingPool.
---

Let me know if you have any questions about the profile results.



	One question, it looks like VariableSizePool is designed to be single
threaded and FixedSizePool is ThreadSafe right.  Those are the test
cases that they pass at any rate.
	My question is whether FixedSizePool should implement ThreadSafe to make
it clear that it can be used in that context?  It appears that it could.

Cheers,
Leif


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>