Dan Luu Profile picture
Jan 17,, 8 tweets, 2 min read
One thing I find interesting is how much tuning of config variables is necessary to get "good" application-level performance.

C-states, P-states, turbo, general prefetch, "buddy" prefetch, etc., at the CPU level, GC configs, etc., at the runtime level, retry policy, thread pools
, etc., at the application level; etc.

A doc I saw recently advocated for Go over Java because it has fewer GC config cars because incorrect GC configs are a major cause of incidents. But not having knobs doesn't solve the problem; it's equivalent to picking an arbitrary config.
Some large companies have an automatic config tuning framework, but very few companies are large enough to want to have a full-stack optimization setup where apps get run on specific hosts that have machine-level configs that are compatible with the application.
Although there are efficiency gains from using "the cloud", not being able to tune host-level stuff is a large and measurable efficiency loss.

Younger companies with the scale/capital to operate their own DCs efficiently (e.g., Stripe) seem to have no desire to do so.
[Back of the envelope numbers]

People are outraged crypto uses 0.5% of world electricity. But 10% of the world's electricity is used by computers and I've never seen a system at a < $900B company where I couldn't get a 10% efficiency win by changing config (frequently >= 50%).
I'm outraged by general inefficiency the same way some people are outraged by bitcoin power consumption. This seems to be uncommon, but I don't understand why since, everywhere I look, I see very easy to fix waste.

Just for example it's pretty common to see applications with ~50% waste due to lack of thread pool size tuning combined with the use of CFS bandwidth control (by far the most commonly used Linux container-level CPU isolation mechanism).

This isn't unique to tech; a competent engineer in any field can find huge waste everywhere they look.

This isn't really talked about much by lay people, the media, etc., because, e.g., disposable plastic packaging is more legible than this thread, but maybe that should change?

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Dan Luu

Dan Luu Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @danluu

Jan 6,
It's really interesting to be on the other side of this.

Because I'm around programmers, I usually hear programmers explain how some other field is simple, but in this thread we have the opposite, someone from another field explaining how programming / engineering is simple
IMO, one of the most common mistaken beliefs I see is the belief that, outside of one's own field, the world is understood.

It's easy to see that, in one's own field, the world is not understood but, for some reason, people don't realize this is also true of other fields.
An example from the hardware world is Intel's Copy Exact methodology, where they tried to make every fab identical.

It's not obvious this is a good idea because it's very expensive to do this since conditions (land, etc.) are different in every location where you have a fab.
Read 8 tweets
Jan 3,
Despite increased centralization over the past 20 years, the internet feels a lot more like the wild west to me in man ways, e.g., the Google index hasn't kept up with the size of the internet, so an increasingly large fraction of the web is undiscoverable via search.
Even 10 years ago, I could basically always find old blog posts I'd read with Google.

Now, an exact string match search with site:[URL] frequently doesn't turn up the result and I have to wget the page and grep for what I'm looking for.
If the site's too large to wget and it doesn't have a custom index, I frequently can't find the page. Large commercial sites, like Twitter, sometimes build complete indexes, but it's a non-trivial effort to index something that's even 1/100th the size of Twitter, so most don't.
Read 8 tweets
Jan 2,
I finally got around to reading Julia Galef's book on how to think clearly, Scout Mindset.

I liked it more than I expected to despite expecting to be highly biased towards liking it since it describes approaches I appreciate.

amzn.to/32TUucm
One thing I really liked about it was that it suggests/summarizes actionable ways to check your own thinking, which I found useful even when it was discussing a way of thinking that I've had since I was a kid since I still mess up all the time and having concrete checks helps.
Another is that it does a really good job of laying out the case for various ways of thinking. There are 6 blog posts that were on my to-do list that I think I don't need to write anymore since the book describes what I wanted to describe, but better than I would've done it.
Read 6 tweets
Jan 1,
I feel like "regretted attrition" is a curiously bad stat to track considering how widely used it is.

On the one hand, it undercounts "attrition we shouldn't have had" by ignoring second order effects that cause people to become "unregretted".
When I've worked in orgs or companies that have low total attrition (~5%), non-regretted attrition has been something like 1% or sometimes as high as 2%.

When regretted is ~15%, non-regretted will be 5% to 10%. Most of that 5% to 10% wouldn't have non-regretted in a good org.
The same things that cause regretted attrition also cause people to burn out and do work that allows the company to call the attrition "non-regretted", but it's only non-regretted if you want to operate a company that sets people up to burn out and lose motivation.
Read 11 tweets
Dec 14, 2021
One thing I've wondered about for a long time is why I fail interviews at such a high rate, e.g., see danluu.com/algorithms-int….

People who've mock interviewed me have a variety of theories, but I don't think any of them are really credible, so I'm going to wildly speculate. When I wrote a draft blog p...
The most suggested reason people have is that I get nervous and that's the problem, which people think because I do fine in their mock interviews.

That's a contributing factor, but I only get nervous because I've failed so many interviews and I didn't used to get nervous, so
there must be at least one other cause.

Another explanation that's consistent with the evidence is that when I say something "stupid sounding", people who mock interview me (who know me) assume it isn't stupid whereas interviews assume it is stupid, e.g.,
Read 28 tweets
Dec 4, 2021
Is there anyone who's writing about different problem solving approaches / styles? An example of the kind of thing I mean (but, incomplete, because it would be nice to see more than two approaches to a problem and I'm only going to discuss two for this example):
Once, at a meetup Matt Singer was hosting, Brendan Gregg asked me what I was working on, and I mentioned that I'd recently written a little (5kLOC) parser to parse every line of every dmesg we had in our datacenters to audit machine health issues.
Of course, Brendan had done a vaguely analogous thing for Netflix and he showed me what he'd done, which was so much in his style that I think that if you saw the result without knowing who did it, you'd say "wow, this looks like something Brendan Gregg would make".
Read 12 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(