Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

Comparing performance of different serving mechanisms

Instructions for setting up Asset Manager on EC2 are in


# Create 1MB file
$ dd if=/dev/zero of=1MB.dat  bs=1M count=1

# Upload file
$ curl \
--form "asset[file]=@1MB.dat"

The tests

# Sendfile
$ ab -n500

# Rails proxy
$ ab -n500

# Nginx proxy (with and without cache)
$ ab -n500

# Redirect
# Note: I don't think ab follows the redirect
$ ab -n500


Mechanism Req/sec -n500 -c1 Req/sec -n500 -c5
Sendfile 300 580
Rails proxy 5 9
Nginx proxy 4.6 23
Nginx proxy + cache 200 420
Redirect 237 450
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment