Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The tales of the cursed operating systems textb...

The tales of the cursed operating systems textbook!

I have a cursed operating systems textbook — each chapter I read unearths a new bug in the systems I work on. Come hear my tales of woe:

the chapter on kernel data structures that conjured up memory leaks INSIDE THE KERNEL!
the catastrophic slowdown caused by the syscalls chapter, narrowly averted by the magic of strace!
the networking chapter and the 200ms slowdown in EVERY network call we were making!
AND MORE!
Along our journey, we’ll acquire some fantastic operating systems tools and incantations you can use to vanquish even the scariest bugs!

Kiran Bhattaram

May 07, 2016
Tweet

More Decks by Kiran Bhattaram

Other Decks in Technology

Transcript

  1. Nagle’s Algorithm for (i=0; i<100000; i++) write(socket, &buffer[i], 1); if

    you have only a few bytes to send, wait until - you have more to fill a packet - or the server acknowledges all outstanding data - or you time out
  2. hi! Here's packet 1. <silence, waiting for the second packet>

    <well I'll ack eventually but maybe there’s more to say> <silence> <well I'm waiting for an ACK maybe there's network congestion?> ok I’m bored. here’s an ack. great! here’s the second packet!!! sweet! we’re done here.
  3. Chapter 3 oints [2015-05-12 23:05:47.9372] Caused by: com.mongodb.MongoException: BSONObj size:

    -286331154 (0xEEEEEEEE) is invalid. Size must be between 0 and 16793600(16MB) First element: oints: ? type=112
  4. Buffers! fsync! • `fsync` flushes all pending writes to the

    database • and the optional `lock` parameter locks writes, so nothing else comes in.