Comparing windows containers CPU perfomance vs alternatives

When presenting containers solution to wider audience question of perfomance invariably comes to place (the same sort of discussion everybody had 10 years ago during virtualization craze). I decided to do unscientific test of running Windows containers vs alternatives. Specifically windows containers are compared against running the same application on physical hardware, inside Hyper-V VM on the same hardware as well as windows containers in process and hypervisolation modes.

You can check results by yourself as image is posted at artisticcheese\iis on docker hub.

Code which is used for testing is designed to return PI number calculates to certain number which is very CPU intensive operation. In my specific run I was calculating to 8000s place with total of 100 requests in multithreaded client.

Client code is below, which is powershell code relying on runspaces via PSParallel module


#requires -Modules PSParallel
Measure-command {1..100 | Invoke-Parallel -ScriptBlock
{Invoke-WebRequest http://localhost/service.svc/pi/8000 -UseBasicParsing}}

Below are results of running this tests against 4 different environments

Test environment Hyper-V Hardware Process Isolation HyperV isolation
96.47 90.12 90.77 91.4
97.12 90.13 90.86 90.24
97.87 89.27 90.49 91.3

Conclusion may be surprising or may be not but running Windows containers introduce virtually no overhead from CPU point of view on application perfomance.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s