Best performing asp.net session state providers

Post on 27-Jan-2015

108 views 2 download

Tags:

description

Best performing ASP.NET Session State Providers; In-Proc, State Service, SQL Server, Redis, Couchbase, Raven and MongoDb - We test them all.

transcript

@DevOpsGuysblog.devopsguys.com

Best performing ASP.NET Session State Providers - 2013

The ResultsBy TheDevMgr@DevOpsGuys

http://blog.devopsguys.comEmail: team@devopsguys.com

@DevOpsGuysblog.devopsguys.com

The Providers

IN-PROC&

STATE SERVER

@DevOpsGuysblog.devopsguys.com

The Providers# Provider Version / NuGet Package / Project Url1 ASP.NET In-Proc Native .NET 4.52 ASP.NET Session State Native .NET 4.53 ASP.NET Sql Server Native .NET 4.54 CouchBase CouchbaseAspNet v1.1

https://github.com/couchbaselabs/couchbase-aspnet5 MongoDb MongoDB-ASP.NET-Session-State-Store v 1.1.0

https://github.com/AdaTheDev/MongoDB-ASP.NET-Session-State-Store6 RavenDb Raven.AspNet.SessionState v1.7.980

https://github.com/mjrichardson/RavenDbSessionStateStoreProvider7 Redis Harbour.RedisSessionStateStore v1.1.0.0

https://github.com/TheCloudlessSky/Harbour.RedisSessionStateStore

@DevOpsGuysblog.devopsguys.com

The Application

• ASP.NET MVC 4.5 Web Application with 2 web views; simple and complex.

• Simple Session State – strings, integers, doubles, datetimes, timespans and Guids.

• Complex Session State – generic lists, array lists, datasets and custom objects

@DevOpsGuysblog.devopsguys.com

The Application

• Simple state test using 30 objects in session.

• Complex state test using 40 objects in session.

@DevOpsGuysblog.devopsguys.com

The Load

• 1000 concurrent users over 60 minutes for each test.

• Each test ran both simple and complex pages (views) to test each session state type.

• Origin: EU West (Ireland)

@DevOpsGuysblog.devopsguys.com

The Infrastructure

• Rackspace UK Public Cloud using OpenStack• Cloud Load balancers x 1 • Cloud Servers x 6– Windows and Linux

@DevOpsGuysblog.devopsguys.com

The ServersServer Role OS RAMWeb 1 IIS / ASP.NET Windows 2012 8GB

Web 2 IIS / ASP.NET Windows 2012 8GB

State Server • State Server Windows 2012 4GB

SQL Server • SQL Server 2012 Standard

Windows 2012 4GB

NoSQLDb-Win • MongoDb• RavenDB

Windows 2012 4GB

NoSQLDb-Unix • Couchbase• Redis

Ubuntu 4GB

@DevOpsGuysblog.devopsguys.com

The Monitoring

• Web server monitoring only. *• Multiple Windows Performance Counters

* Tests conducted before new relic plugins for SQL, mongo, etc released

@DevOpsGuysblog.devopsguys.com

THE RESULTS

@DevOpsGuysblog.devopsguys.com

WINNER

@DevOpsGuysblog.devopsguys.com

Best Performers# Provider Remarks

1 Redis Overall the strongest performer winning 4 of 6 tests.

2 In-Proc Good performer, but not suitable for web farms.

3 Session State Service Very solid performer.

4 Couchbase Another solid performer.

5 SQL Server Best memory manager, but still a sledge hammer.

6 MongoDb Poor performance under high load, possible memory issues.

7 RavenDb The provider has a memory leak.

@DevOpsGuysblog.devopsguys.com

Overall Results# Provider Server

ResponseTime (ms)

Throughput(RPM)

Response Time

(Avg.)(ms)

ResponseTime

(Max)(ms)

Memory Management

Hourly Growth

Processor Time(avg)

2 In-Proc 31 7630 401.56 25,002 0.58% 26%

3 Session State Service 33 7590 493.29 26,583 1.74% 29%

5 SQL Server 2012 34 7520 627.05 29,780 -0.26% 23%

1 Redis 33 7640 384.37 23,065 1.38% 20%

6 MongoDb 35 7060 1877.74 120,185 3.57% 25%

4 Couchbase 35 7590 508.99 27,615 1.48% 27%

7 RavenDb 1220 0.267 7584.38 41,512 91.5% 35%

@DevOpsGuysblog.devopsguys.com

Couchbase In-Proc MongoDb RavenDb Redis Session State Provider

SQL Server 2012

Total 35 31 35 1220 33 33 34

100

300

500

700

900

1100

1300

Axis Title

Server Response Time

IN-PROC

@DevOpsGuysblog.devopsguys.com

Couchbase In-Proc MongoDb RavenDb Redis Session State Ser-vice

SQL Server 2012

Total 7590 7630 7060 0.267 7640 7590 7520

500

1500

2500

3500

4500

5500

6500

7500

8500

Axis Title

Transaction Throughput

@DevOpsGuysblog.devopsguys.com

Couchbase In-Proc MongoDb RavenDb Redis Session State Ser-vice

SQL Server 2012

Total 508.99 401.56 1877.74 7584.38 384.37 493.29 627.05

500

1500

2500

3500

4500

5500

6500

7500

Axis Title

External Response Time *Avg

@DevOpsGuysblog.devopsguys.com

Couchbase In-Proc MongoDb RavenDb Redis Session State Ser-vice

SQL Server 2012

Total 27615 25002 120185 41512 23065 26583 29780

10000

30000

50000

70000

90000

110000

130000

Axis Title

External Response Time *Max

@DevOpsGuysblog.devopsguys.com

Memory Management – Hourly Growth

Couchbase In-Proc MongoDb RavenDb Redis Session State Ser-vice

SQL Server 2012

Total 0.0148007424329295

0.00579914927756269

0.0357303569487056

0.915047177087133

0.0137981506189599

0.0173983178677513

-0.0025738942330

4185

-10.00%

10.00%

30.00%

50.00%

70.00%

90.00%

Axis Title

@DevOpsGuysblog.devopsguys.com

Processor Time (Avg)

Couchbase In-Proc MongoDb RavenDb Redis Session State Ser-vice

SQL Server 2012

Total 27 26 25 35 20 29 23

2.5

7.5

12.5

17.5

22.5

27.5

32.5

37.5

Axis Title

@DevOpsGuysblog.devopsguys.com

APPENDICESOther notable stuff

@DevOpsGuysblog.devopsguys.com

RavenDb Provider Memory Leak

• More than 500MBs between overall Min and overall Max and an increasing trend of more than 100MBs per hour

@DevOpsGuysblog.devopsguys.com

More Information

• We plan to release more information about the test on the DevOpsGuys blog.

http://blog.devopsguys.com

THANKS FOR READING!