text
stringlengths
0
2.29k
**Tim McNamara:** No, my pleasure. It's my genuine pleasure. I really love the way that the show has progressed, and it's quite a privilege to be speaking to you here.
**Gerhard Lazu:** Thank you, Tim. I appreciate it. Now, how are your ribs, your physical ribs? \[laughter\] That was attempt number three, right?
**Tim McNamara:** Right, right. So what happened... As context, I was riding a mountain bike along the river, came across a ditch, and I thought, "Oh, look, that's looking a little bit deep. I should slow down." I didn't quite slow down. I thought, it'd be fun to try and get through the ditch. My front wheel went down ...
**Gerhard Lazu:** You did, actually... So I knew that you really cared about it, right? I mean, if you're like in a hospital, and you remember to text me "Hey, Gerhard, sorry, I will not be able to make our slot." I mean, you have no idea how much I appreciate that, Tim. Thank you.
**Tim McNamara:** Yeah. So ribs are okay, actually... Bruising is fine, that will go away. I've injured some ligaments that connect my ribs and my spine, which makes it quite hard to breathe in, and also to do things like lie down or put on my shoes... But I've been told that I will heal; bodies are crazy, they're good...
**Gerhard Lazu:** And Superman, so we clear that, right? You're not Superman... \[laughs\]
**Tim McNamara:** Yeah...
**Gerhard Lazu:** You can't fly. Well, you can, but...
**Tim McNamara:** Multiple years since I'd been on a mountain bike, and one needs to appreciate one's own limits sometimes.
**Gerhard Lazu:** Right, right. So how are you with laughter?
**Tim McNamara:** Laughter is okay, actually. I've been surprised...
**Gerhard Lazu:** Dang it!
**Tim McNamara:** Yeah, you really -- but sneezing... Like, let's say there's some dust in the room - that would basically send a dagger into my ribs, which...
**Gerhard Lazu:** I'm not sure what I can do about sneezing. I could have helped you with laughter... But let's see. I can only try. So you are a public figure. I enjoy reading your tweets very much. I'll have a question related to your Twitter handle, which I think is great. However, you're tweeting when -- I think it...
**Tim McNamara:** Yes. So, I am in a very privileged position where most of my team -- so I can work remotely from New Zealand. This is very rare within AWS. Most of my team are based in the West Coast of the United States, and the remainder are in Europe. And so my day, or my week is typically staggered so that I will...
\[05:56\] Typically, people are very understanding of the fact that I'm in a very strange timezone... The only trouble is if I wake up early, and then also don't get to sleep properly, because I'm sort of mentally preparing for the upcoming discussion, my brain doesn't really have a very good off switch. That's the thi...
**Gerhard Lazu:** I know what you mean. Yeah, it just wakes up; the brain wakes up separately from the body, it starts churning, and then it wakes up everything else. And usually, it's like work-related thoughts, experiments, things... "Oh, have I said that? Have I done that?" I know exactly what you mean. I get asked ...
**Tim McNamara:** So my job title is senior software development engineer. My job role though is a little bit broader than a typical software person. So I work within a central team, supporting the development of the Rust programming language within Amazon. That includes AWS, as well as retail, and into like Amazon Go ...
So the team that I work on is mostly centered on internal support. So we do some technical things around like supporting the internal build system, we have a mirror of the open source sort of package ecosystem... Crates.io is the Rust equivalent of let's say npm, for sort of the Node ecosystem, or PyPy in Python... And...
The thing that is slightly unique to my job is I've increasingly become seen as the person who is driving education, or adoption of Rust at Amazon. So this year, I'm actually going to be leading an education project for like "How do we teach tens of thousands of programmers Rust?" I mean, it won't actually be that big,...
**Gerhard Lazu:** The scale, yeah...
**Tim McNamara:** ...that we want to create a pathway for teams that are looking to adopt Rust, to be able to give them a path forward... Because most services at Amazon are written in Java, and teams choose their own tools. So there's no way to sort of centrally dictate that such and such a team or such and such servi...
And one of the things that we've found is that teams that are looking to adopt Rust will typically have one or two people who have been tinkering with the language, and they've found that things run really quickly, or that they save a lot of memory, and that they reduce the operational burden... So their systems are mo...
\[10:17\] And so these are kind of the internal dynamics, that we have teams that are very optimistic about their futures, and they're keen to experiment; let's say one step above or beyond them might be a little bit of resistance, or a skepticism of a lot of the claims. The Rust community seems to make these ridiculou...
**Gerhard Lazu:** Now that's something worth doing. Right? Forget about your build times, right? Forget about latency; how about we save the planet first?
**Tim McNamara:** We can. And actually, my personal view is that software engineering is now in a significantly important part of social change, because all new products, I'd say the vast majority of them are software-first, or at least software-enabled. This actually means that the people who implement software are an...
**Gerhard Lazu:** You work from home, what are you on about? \[laughs\]
**Tim McNamara:** I work from home, but there's an office though, like further down \[unintelligible 00:11:44.26\] I do primarily work from home, so this is a bit of a cheat. Dang it...!
**Gerhard Lazu:** Quick, Tim; think of something else.
**Tim McNamara:** I was on a roll. I was gonna say, I've been a vegetarian for like two decades now, and it was primarily for ecological reasons... And so I am not normal from that regard, but I still think that there was an argument that I feel quite persuasive; that we as a software industry can do better. We can res...
So a lot of these cloud platforms or cloud services are very -- if you notice the way that their pricing structure works, typically compute scales quite well, so it's quite cheap to oversubscribe CPU. You know this if you've ever managed your own Kubernetes clusters; you can kind of oversubscribe CPU quite well. But on...
**Gerhard Lazu:** Crash.
**Tim McNamara:** They don't crash.
**Gerhard Lazu:** OOM. There is no OOM for CPU.
**Tim McNamara:** That's right, that's right. The scheduler just kind of figures it out. And performance degrades, but it doesn't catastrophically blow up. Now, my hunch - and this is from the perspective of someone completely outside of pricing, and all the rest of it, is that Rust's ability to provide very low memory...
\[14:14\] So our experience at AWS is that the real benefit from like a Rust rewrite is at like the pain 99.99, that is tail latencies. So in garbage-collected languages -- so just for anyone who's not aware, a garbage collector is a kind of an appliance that sits next to your application, that manages memory. So if yo...
**Gerhard Lazu:** Yep.
**Tim McNamara:** And so under periods of high contention, these garbage collection pauses are very, very problematic, especially at large scale, when your servers are running very hot, but you might have hundreds -- let's actually take one public case, which is actually not from AWS; it's from a company called Discord...
So the Rust \[unintelligible 00:16:32.04\] actually had two effects. One, we had less memory usage overall, which goes to the earlier point... But what we're talking about now is the latency - there was even at p 99 point whatever it is, they never had these latency spikes. And so actually, the user experience suddenly...
You think about a relatively popular messaging system, one in every 100 messages is going slowly; actually, it's going to create a lot of like lag for that conversation as a whole. Like, it doesn't take that many messages if there are ten recipients, for the p 99 to start really impacting the usability of the entire ex...
**Gerhard Lazu:** We will dig into a few more stories, because I was looking to see -- so first of all, a few months ago you gave a talk at AWS re:Invent that fascinated me. I thought it was an amazing talk. And not just because of you, because of the topic as well. Right? So I think they both worked really, really wel...
\[18:03\] Now, you gave the Discord example; that was a very good one. In your talk, you presented Alan Ning, an SRE at Tenable.io. And he wrote this in 2021. He said that with Rust, they saw a reduction of 75% in CPU usage, and a 95% reduction in memory usage in production. I was disappointed, I was hoping 100%... \[l...
**Tim McNamara:** Yeah. Clearly, Rust has work to do.
**Gerhard Lazu:** But that's good enough, right?
**Tim McNamara:** 95% is, a good baseline, let's say...
**Gerhard Lazu:** Not enough. It should be 99. It should start with 99, right? That's when we start paying attention. So seriously, they went from using over 1000 CPUs, to 300. And again, we will link to the blog post for others to see. So that's great; less CPU, less memory, but latency. I'm a big fan of low latency. ...
Now, let me check... So now I'm going to watch my dual fiber WAN setup for latency, okay? That was attempt number for; we recorded, but your fiber was -- well, it wasn't your fiber, but anyways...
**Tim McNamara:** Yeah, my internet connection was just not really...
**Gerhard Lazu:** It wasn't that. But anyways, like latency in internet is a big deal.
**Tim McNamara:** This is something I appreciate a lot, by the way, being in New Zealand and having services quite frequently hosted in the United States or Europe... That apparently, the speed of light requires that I wait for hundreds of milliseconds quite frequently.