[concurrency-interest] Lock performance in virtualized environment
viktor.klang at gmail.com
Fri Feb 24 11:42:27 EST 2012
Use a non-blocking concurrent hashmap.
On Feb 24, 2012 4:42 PM, "Talip Ozturk" <oztalip at gmail.com> wrote:
> I did a simple test to see how virtualized environment affects the
> performance of a multithreaded application. My test application was
> creating a ConcurrentHashMap, starting 40 threads, each doing
> map.put() in a while(true) loop. I ran it on my laptop (MacBookAir i7)
> first and then started a Ubuntu on Parallels with same number of CPUs.
> I was happy to see that both my laptop and the Ubuntu on Parallels
> were doing -almost- the same number of map.put() operations per sec.
> So virtualization wasn't affecting much.
> Then I changed my ConcurrentHashMap to have concurrencyLevel=1 to see
> how contention will affect. Performance went down on each as expected
> but throughput of virtual machine was half of my laptop!
> I then started playing with LockSupport.park/unpark. The results were
> similar: Throughput is half on virtualized environment. I am getting
> the same feeling when running my tests on Amazon EC2. Looks like
> others had the same issue:
> Is this a known issue? Any way to optimize it?
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest