[concurrency-interest] Lock performance in virtualized environment

√iktor Ҡlang viktor.klang at gmail.com
Fri Feb 24 11:42:27 EST 2012


Use a non-blocking concurrent hashmap.

Cheers
V
On Feb 24, 2012 4:42 PM, "Talip Ozturk" <oztalip at gmail.com> wrote:

> Hi,
>
> 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:
> https://forums.aws.amazon.com/thread.jspa?threadID=75388
>
> Is this a known issue? Any way to optimize it?
>
> Thanks,
> -talip
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20120224/5d8e6ebf/attachment.html>


More information about the Concurrency-interest mailing list