---
title: How Netflix tunes Ubuntu on EC2
description: One of the nice things about having Netflix running Ubuntu is that the
  community can take advantage of the lessons they learn about running services at
  scale. I had the pleasure of attending Brendan Gregg’s Linux Profiling at Netflix
  talk at SCALE13x and afterwards he gave me a list of things that Netflix did to
  Ubuntu  […]
url: https://canonical.com/blog/how-netflix-tunes-ubuntu-on-ec2?format=md
---

1. [Blog](https://canonical.com/blog)
2. Article

---

[Jorge O. Castro](https://canonical.com/blog/author/jorge "More about Jorge O. Castro")

11 August 2015

# How Netflix tunes Ubuntu on EC2

[ec2](https://canonical.com/blog/tag/ec2)
[Ubuntu](https://canonical.com/blog/tag/ubuntu)

---

Share the article

One of the nice things about having Netflix running Ubuntu is that the community can take advantage of the lessons they learn about running services at scale.

I had the pleasure of attending Brendan Gregg’s [Linux Profiling at Netflix](http://www.brendangregg.com/blog/2015-02-27/linux-profiling-at-netflix.html) talk at SCALE13x and afterwards he gave me a list of things that Netflix did to Ubuntu to meet their needs. A bunch of it was bug reports, things like this [Xen issue](https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1304001), and other fixes that have since been incorporated into 14.04 and our cloud images. Afterwards, Brendan did a follow up talk on how Netflix tunes their instances.

**WARNING: These tunables were developed in late 2014, for Ubuntu 14.04 on EC2. They are meant to be shared as a baseline for you to experiment with, don’t consider these production-ready without proper testing, etc.**

CPU

```
schedtool –B PID
```

Virtual Memory

```
vm.swappiness = 0 # from 60
```

Huge Pages

```
# echo never > /sys/kernel/mm/transparent_hugepage/enabled # from madvise
```

File System

```
vm.dirty_ratio = 80 # from 40
vm.dirty_background_ratio = 5 # from 10
vm.dirty_expire_centisecs = 12000 # from 3000
mount -o defaults,noatime,discard,nobarrier …
```

Storage I/O

```
/sys/block/*/queue/rq_affinity 2
/sys/block/*/queue/scheduler noop
/sys/block/*/queue/nr_requests 256
/sys/block/*/queue/read_ahead_kb 256
mdadm –chunk=64 ...
```

Networking

```
net.core.somaxconn = 1000
net.core.netdev_max_backlog = 5000
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_wmem = 4096 12582912 16777216
net.ipv4.tcp_rmem = 4096 12582912 16777216
net.ipv4.tcp_max_syn_backlog = 8096
net.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.tcp_tw_reuse = 1
net.ipv4.ip_local_port_range = 10240 65535
net.ipv4.tcp_abort_on_overflow = 1 # maybe
```

Hypervisor (Xen)

```
echo tsc > /sys/devices/system/clocksource/clocksource0/current_clocksource
```

Here are the [accompanying slides](http://www.slideshare.net/brendangregg/performance-tuning-ec2-instances) to the talk.

### Where to test?

As Greg mentions, it would be silly for everyone to just take these settings and blindly run them. Just because setting X works for Netflix doesn’t necessarily mean it will work for you. This is why we’ve set up [cloud-benchmarks.org](http://cloud-benchmarks.org), where the community can submit benchmarks of complex deployed systems, and then compare them across clouds.

Take a service you care about, run it with stock Ubuntu, and then run it with these settings, then start iterating and tweaking, share your results, and then, most importantly, start the discussion about performance with your peers.

Many thanks to Brendan and Netflix for sharing their Devops expertise with us!

[Get in touch

Interested in running Ubuntu in your organization?](https://ubuntu.com/about/contact-us/form)

## Sign up for our newsletter

Get the latest Canonical news and updates in your inbox.

Work email:

\*I agree to receive information about Canonical's
products and services.

By submitting this form, I confirm that I have read and agree to [Canonical's Privacy Policy](https://canonical.com/legal/dataprivacy).

Sign up

## Share on

---

## Related posts

[### Arduino® VENTUNO™ Q is available for pre-order with Ubuntu pre-installed](https://canonical.com/blog/arduino-ventuno-q-is-available-for-pre-order-with-ubuntu-pre-installed)

London, UK – August 25, 2026 – Following our initial collaboration announcement in March 2026, Canonical and Arduino (a subsidiary of Qualcomm Technologies, Inc.) are excited...

[Canonical](https://canonical.com/blog/author/canonical)

25 August 2026

[### Canonical becomes Gold Sponsor of Trifecta Tech Foundation](https://canonical.com/blog/canonical-becomes-gold-sponsor-of-trifecta-tech-foundation)

Canonical is pleased to announce it is now a Gold Sponsor of the Trifecta Tech Foundation, a non-profit that creates open source building blocks for critical infrastructure...

[Canonical](https://canonical.com/blog/author/canonical)

30 June 2026

[### Ubuntu Summit 26.04: connected by open source](https://canonical.com/blog/ubuntu-summit-26-04-connected-by-open-source)

What an incredible experience! Ubuntu Summit 26.04 has officially drawn to a close, but the energy from our global community is still buzzing – in the comments section, on...

[ilvipero](https://canonical.com/blog/author/ilvipero)

22 June 2026

[### A decade of Ubuntu on IBM Z and IBM LinuxONE](https://canonical.com/blog/a-decade-of-ubuntu-on-ibm-z-and-ibm-linuxone)

This year we celebrate a decade of Ubuntu Server support on the s390x architecture: marking a long-standing collaboration between Canonical and IBM that began at LinuxCon 2015....

[Pedro Lazzarotto](https://canonical.com/blog/author/pedro-lazzarotto)

12 June 2026
