<story><title>Dropbox’s Exodus from the Amazon Cloud</title><url>http://www.wired.com/2016/03/epic-story-dropboxs-exodus-amazon-cloud-empire</url></story><parent_chain><item><author>jamwt</author><text>Good questions, let me try to tackle them one by one.&lt;p&gt;&amp;gt; The article makes a brief mention of Go causing issues with RAM usage. Was this due to large heap usage, or was it a problem of GC pressure&amp;#x2F;throughput&amp;#x2F;latency? If the former, what were some of the core problems that could not be further optimized in Go?&lt;p&gt;The reasons for using rust were many, but memory was one of them.&lt;p&gt;Primarily, for this particular project, the heap size is the issue.  One of the games in this project is optimizing how little memory and compute you can use to manage 1GB (or 1PB) of data.  We utilize lots of tricks like perfect hash tables, extensive bit-packing, etc.  Lots of odd, custom, inline and cache-friendly data structures.  We also keeps lots of things on the stack when we can to take pressure off the VM system.  We do some lockfree object pooling stuff for big byte vectors, which are common allocations in a block storage system.&lt;p&gt;It&amp;#x27;s much easier to do these particular kinds of optimizations using C++ or Rust.&lt;p&gt;In addition to basic memory reasons, saving a bit of CPU was a useful secondary goal, and that goal has been achieved.  The project also has a fair amount of FFI work with various C libraries, and a kernel component.  Rust makes it very easy and zero-cost to work closely with those libraries&amp;#x2F;environments.&lt;p&gt;For this project, pause times were not an issue.  This isn&amp;#x27;t a particularly latency-sensitive service.  We do have some other services where latency does matter, though, and we&amp;#x27;re considering Rust for those in the future.&lt;p&gt;&amp;gt; Could you comment more generally on what advantages Rust offered and where your team would like to see improvement?&lt;p&gt;The advantages of Rust are many.  Really powerful abstractions, no null, no segfaults, no leaks, yet C-like performance and control over memory and you can use that whole C&amp;#x2F;C++ bag of optimization tricks.&lt;p&gt;On the improvements side, we&amp;#x27;re in close contact with the Rust core team--they visit the office regularly and keep tabs on what we&amp;#x27;re doing.  So no, we don&amp;#x27;t have a ton of things we need.  They&amp;#x27;ve been really great about helping us out when those things have sprung up.&lt;p&gt;Our big ask right now is the same as everyone else&amp;#x27;s--improve compile times!&lt;p&gt;&amp;gt; Are there portions where the decision to use Rust caused complications or problems?&lt;p&gt;Well, Dropbox is mostly a golang shop on the backend, so Rust is a pretty different animal than everyone was used to.  We also have a huge number of good libraries in golang that our small team had to create minimal equivalents for in Rust.  So, the biggest challenge in using Rust at Dropbox has been that we were the first project!  So we had a lot to do just to get started...&lt;p&gt;The other complication is that there is a ton of good stuff that we want to use that&amp;#x27;s still being debated by the Rust team, and therefore marked unstable.  As each release goes on, they stabilize these APIs, but it&amp;#x27;s sometimes a pain working around useful APIs that are marked unstable just because the dust hasn&amp;#x27;t settled yet within the core team.  Having said that, we totally understand that they&amp;#x27;re being thoughtful about all this, because backwards compatibility implies a very serious long-term commitment to these decisions.</text></item><item><author>dikaiosune</author><text>The article makes a brief mention of Go causing issues with RAM usage. Was this due to large heap usage, or was it a problem of GC pressure&amp;#x2F;throughput&amp;#x2F;latency? If the former, what were some of the core problems that could not be further optimized in Go? If the latter, I&amp;#x27;ve heard recent versions have had some significant improvements -- has your team looked at that and thought that you would have been OK if you just waited, or was there a fundamental gap that GC improvements couldn&amp;#x27;t close?&lt;p&gt;Could you comment more generally on what advantages Rust offered and where your team would like to see improvement? Are there portions of the Dropbox codebase where you&amp;#x27;d love to use Rust but can&amp;#x27;t until &amp;lt;feature&amp;gt; RFCs&amp;#x2F;lands&amp;#x2F;hits stable? Are there portions where the decision to use Rust caused complications or problems?</text></item><item><author>jamwt</author><text>Hi HN!  A couple of us from the Magic Pocket software team are around to answer questions if anyone has some.</text></item></parent_chain><comment><author>steveklabnik</author><text>&lt;p&gt;&lt;pre&gt;&lt;code&gt;  &amp;gt; On the improvements side, we&amp;#x27;re in close contact with the Rust core team
&lt;/code&gt;&lt;/pre&gt;
One small note here: this is something that we (Rust core team) are interested in doing generally, not just for Dropbox. If you use Rust in production, we want to hear from you! We&amp;#x27;re very interested in supporting production users.</text></comment>
<story><title>Dropbox’s Exodus from the Amazon Cloud</title><url>http://www.wired.com/2016/03/epic-story-dropboxs-exodus-amazon-cloud-empire</url></story><parent_chain><item><author>jamwt</author><text>Good questions, let me try to tackle them one by one.&lt;p&gt;&amp;gt; The article makes a brief mention of Go causing issues with RAM usage. Was this due to large heap usage, or was it a problem of GC pressure&amp;#x2F;throughput&amp;#x2F;latency? If the former, what were some of the core problems that could not be further optimized in Go?&lt;p&gt;The reasons for using rust were many, but memory was one of them.&lt;p&gt;Primarily, for this particular project, the heap size is the issue.  One of the games in this project is optimizing how little memory and compute you can use to manage 1GB (or 1PB) of data.  We utilize lots of tricks like perfect hash tables, extensive bit-packing, etc.  Lots of odd, custom, inline and cache-friendly data structures.  We also keeps lots of things on the stack when we can to take pressure off the VM system.  We do some lockfree object pooling stuff for big byte vectors, which are common allocations in a block storage system.&lt;p&gt;It&amp;#x27;s much easier to do these particular kinds of optimizations using C++ or Rust.&lt;p&gt;In addition to basic memory reasons, saving a bit of CPU was a useful secondary goal, and that goal has been achieved.  The project also has a fair amount of FFI work with various C libraries, and a kernel component.  Rust makes it very easy and zero-cost to work closely with those libraries&amp;#x2F;environments.&lt;p&gt;For this project, pause times were not an issue.  This isn&amp;#x27;t a particularly latency-sensitive service.  We do have some other services where latency does matter, though, and we&amp;#x27;re considering Rust for those in the future.&lt;p&gt;&amp;gt; Could you comment more generally on what advantages Rust offered and where your team would like to see improvement?&lt;p&gt;The advantages of Rust are many.  Really powerful abstractions, no null, no segfaults, no leaks, yet C-like performance and control over memory and you can use that whole C&amp;#x2F;C++ bag of optimization tricks.&lt;p&gt;On the improvements side, we&amp;#x27;re in close contact with the Rust core team--they visit the office regularly and keep tabs on what we&amp;#x27;re doing.  So no, we don&amp;#x27;t have a ton of things we need.  They&amp;#x27;ve been really great about helping us out when those things have sprung up.&lt;p&gt;Our big ask right now is the same as everyone else&amp;#x27;s--improve compile times!&lt;p&gt;&amp;gt; Are there portions where the decision to use Rust caused complications or problems?&lt;p&gt;Well, Dropbox is mostly a golang shop on the backend, so Rust is a pretty different animal than everyone was used to.  We also have a huge number of good libraries in golang that our small team had to create minimal equivalents for in Rust.  So, the biggest challenge in using Rust at Dropbox has been that we were the first project!  So we had a lot to do just to get started...&lt;p&gt;The other complication is that there is a ton of good stuff that we want to use that&amp;#x27;s still being debated by the Rust team, and therefore marked unstable.  As each release goes on, they stabilize these APIs, but it&amp;#x27;s sometimes a pain working around useful APIs that are marked unstable just because the dust hasn&amp;#x27;t settled yet within the core team.  Having said that, we totally understand that they&amp;#x27;re being thoughtful about all this, because backwards compatibility implies a very serious long-term commitment to these decisions.</text></item><item><author>dikaiosune</author><text>The article makes a brief mention of Go causing issues with RAM usage. Was this due to large heap usage, or was it a problem of GC pressure&amp;#x2F;throughput&amp;#x2F;latency? If the former, what were some of the core problems that could not be further optimized in Go? If the latter, I&amp;#x27;ve heard recent versions have had some significant improvements -- has your team looked at that and thought that you would have been OK if you just waited, or was there a fundamental gap that GC improvements couldn&amp;#x27;t close?&lt;p&gt;Could you comment more generally on what advantages Rust offered and where your team would like to see improvement? Are there portions of the Dropbox codebase where you&amp;#x27;d love to use Rust but can&amp;#x27;t until &amp;lt;feature&amp;gt; RFCs&amp;#x2F;lands&amp;#x2F;hits stable? Are there portions where the decision to use Rust caused complications or problems?</text></item><item><author>jamwt</author><text>Hi HN!  A couple of us from the Magic Pocket software team are around to answer questions if anyone has some.</text></item></parent_chain><comment><author>anp</author><text>Thanks very much for the detailed and thoughtful answers!&lt;p&gt;I&amp;#x27;ve read before (somewhere, I think) that Dropbox effectively maintains a large internal &amp;quot;standard library&amp;quot; rather than relying on external open source efforts. How much does Magic Pocket rely on Rust&amp;#x27;s standard library and the crates.io ecosystem? Could you elaborate on how you ended up going in whichever direction you chose with regards to third-party open source code?</text></comment>