Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.
Ryan Nowak edited this page May 7, 2017 · 6 revisions

Quick Links

Instuctions for the dev Branch

What's Here?

JitBench repository for ASP.NET Core workloads suitable for testing the startup performance.

Right now there is only one workload app here, at src/MusicStore

About MusicStore

MusicStore is a good sample of what a typical but small customer app would look like for a browser-based LOB app or public website. Notably it uses auth, logging, databases, ORM, caching, and dynamic view content. It's a good representation of the concerns a typical production app needs to address.

We've modified the app to start up the server and perform a single HTTP request with timing information. Then it will perform 100 requests (single threaded) and print some statistics. We feel like this is a good benchmark for both server cold start and local development cold start, and is suitable for iterating on quickly due to the ease of running.

What does JitBench Measure?

JitBench measures the cold start time (including the first request) as well as some basic steady-state throughput. All of the measurements are conducted by performing HTTP requests over the loopback interface (single threaded).

Typical output looks like:

> dotnet .\MusicStore.dll
Server started in 687ms

Starting request to http://localhost:5000
Response: OK
Request took 2846ms

Cold start time (server start + first request time): 3533ms


Running 100 requests
Steadystate min response time: 3ms
Steadystate max response time: 11ms
Steadystate average response time: 3ms

ASP.NET loaded from store

FAQ

What about x86?

You can do x86! Just substitute x86 for x64 in step 1 and step 3.

You need to do a git clean -xdf and start over at step 1 if you are switching architectures.

What about linux/OSX?

All of the instructions should include the alternate steps for linux and OSX. Where the instructions require something other than a vanilla dotnet command we usually have a .sh and a .ps1 script.

Things are failing what do I do?

Do a git clean -xdf and get back to a clean state. Then start over at step 1.

If you still have a problem, open an issue on this repo. Opening an issue here is the best way to get a quick response. Usually the cause of issues that we run into here is upstream but we do our best to track known problems and workarounds with the issue tracker here.

Powershell Errors

The scripts in this repo use powershell. If you're not a powershell user you will have to do some first-time setup on your machine.

Open powershell as admin and run Set-ExecutionPolicy Unrestricted, accept the prompt. By default powershell does not allow you to run scripts 👎

What is Microsoft.AspNetCore.All

This is a meta-package that contains all of the ASP.NET libraries. This is the easiest way to just pull in the whole platform as a reference. We expect that this will be the common way to build applications in ASP.NET going forward.

What is Build.RuntimeStore?

This is a big zip file of pre-optimized ASP.NET libraries. This is the best way for us to test the JIT because this is very close to what customers will use for local development or on a shared host like Azure in 2.0.0. Think of it like an add-on to the shared framework. Read the Explanation section below for a description of how this is wired up.