The logging framework isn't a bottleneck, and other lies your laptop tells you
tech.davis-hansson.com
tech.davis-hansson.com
I guess in a pinch but that is a solution that I just don't think I would like.... I would feel like we're going to figure this out, not surrender to the absurd...
They were able to figure it out and rewrote one stored procedure so it ran fast again. But I'm sure that I, for example, don't possess the necessary expertise to figure this out. I wouldn't be surprised that in many small-to-medium companies there are no experts of that level either.
That said, due to previous TSC instability all operating systems deal with a TSC warp pretty well. Whether applications deal well with it is probably the reason why emulation is the default, but it could be that this can be disabled.
(Everything AFAIRC)
Maybe putting the laptop in the data center lets you do the launch. Maybe the launch is a flop because you forgot to advertise it. Maybe you raise series A funding; maybe you don't and the site dies in three months, still happily running on the laptop. Maybe someone decides to re-write the product in a different stack. Maybe the product was wrong and needs to pivot.
A lot of products have shipped and succeeded with absurd hacks in them. Hex-editing the binary to change "EMM386 Memory Error.." to "Thank you for playing Wing Commander", etc.
Most good developers want to pay down technical debt. Most good architects are able to balance business and technical needs enough to know when and how to pay down what debt without spending four sprints renaming variables. It's when you have either dis-functional leadership who refuses to listen to their employees (most likely IME), or architects weak in either skill or constitution who can't or won't stand up the bosses to try to explain to them why we need to spend some time renaming variables.
https://i.imgflip.com/24ac74.jpg
(I know, jokes should be down to a minimum on YC, but this was too relevant).
Also relevant: https://xkcd.com/1988/
One of the first things you do when you get hired here as a developer is request that a machine get provisioned for you in the data center and provide your public ssh key. You’re not allowed to do anything on the MacBook they give you other than mail/wiki/chat/ssh. IMO it’s pretty brilliant.
One extra nice thing is that the OPs people rather than the corporate IT people manage it so it actually works well.
Every customer except one used our app on linux machines, and every developer had linux environment, but sometimes you had to debug or build a new version of the software for that one windows customer.
In that case we connected through remote desktop to Rafał's Computer and worked there, because nobody could figure out how to make it work anywhere else.
Rafał quit that company 1 year after I came to work there. When I was leaving 6 years later the "Rafał's Computer" was a part of critical infrastructure and there was an effort to virtualize it :) It's a miracle it worked so long without disk failing TBH :)
I'm sometimes wondering if now, 5 years later - they still have Rafał's Computer around. Hopefully they managed to virtualize it eventually :)
It seems starting around maybe 2012~13, devs in the tech industry started moving from Windows laptops to Macbooks in large scale, and this was when it became much more common to run your server stack locally on the laptop. This was really strange to me at first; since prior to this, I was very used to having "dev servers". I came from LAMP world where we'd write code on Windows, upload code to a dev server, run the app on it and test. This seems very amateur in retrospect, but I also worked in a relatively large unicorn at the time (from 2008 to 2013) and I don't think we were even the only company doing that -- from what I knew, this was pretty much standard practice, especially if you run LAMP stack. Which is to say, it was way more common back in the days to dev on a dev server than on their own laptop. (Maybe that's a point against Windows at the time; about how difficult it was to have a reasonable local dev environment on Windows.)
So when I joined a startup later, and found out how everyone on the team had Macbooks (with no option of going Windows), and everyone ran the entire server app on their laptops (and this was the nodejs world, no longer LAMP), I was almost in disbelief -- are we not to worry about any difference between developing, testing and running this server code on a Mac laptop, vs when deploying it and have it actually run on a Linux server later? After a short while it seemed like it was not really a concern; it seems perhaps either macOS linux is close enough to servers, or node is compatible/high-level enough between mac and linux.
Reading this article is kind of a wake-up call -- no, it's really not exactly the same.
Go still has a way to go in terms of productivity-boosting frameworks in comparison to Python though. I hate the tight coupling of and patterns of Django but if I had to spin up a company in a month, there's no doubt I would do it Django.
Lots of people will say "frameworks are an anti-pattern in Go" and I generally agree with the sentiment of writing boilerplate to stitch together various libraries > giving control to the framework.
Still, some people want big hefty, quick-to-production frameworks with everything & the kitchen sink built in. I'm certain we will see those come into existence for Go.
In a couple of days you can have a production-ready site and I've never seen anything quite like it for productivity.
The models and rest framework are convenient but you could probably do the same in close to the same amount of time in another language or framework.
Another problem with developing locally is that the dev is the only simultaneous user, and doesn’t have to share the resources with other users.
I guess the takeaway is to always validate your assumptions through measurements like profiling etc.
In my opinion is is much better to develop a cross platform/environment product that can work everywhere and the key to that is to avoid assumptions about where the product is executing. In the long run, this makes your software much more flexible.
Usually every developer has their own login user on the development machine, but that is enough to skew performance profiling, because usernames populates environment variables & that will change memory layout of any program that the shell executes.
It's great that they can average out the random effect of layout, but what I meant by optimization opportunity is to deliberately aim for the "good" memory layouts. Something like fixing the alignment of the stack on program entry point or marking specific functions as "stack aligned".
I really doubt it has been that recent — I think the Great Migration to Macs started a decade earlier.
Meanwhile, a lot of us have been developing on Linux and deploying on Linux even longer still. Heck, that's a good part of how Linux got popular, although once upon a time it was develop on Linux in order to deploy on Solaris or HP-UX (or even AIX)!
Run your code in Docker for Mac, that'll fix the problem.
I was equally as shocked to discover the crap-show that is the m.2 controller space. I felt for sure supermicro would have chassis you could load up with those suckers and they'd be hot-swappable and changing the face of storage. Instead I found proprietary(Intel/AMD) RAID drivers coupled to specific CPU models and expansion cards that could take a measly 4 drives(no hot-swapp).
For example, here's what you're looking for: https://www.supermicro.com/en/products/system/1U/1029/SSG-10...
[1]: https://www.youtube.com/watch?v=LDOlqgUZtHE (Accelerating Computational Storage Over NVMe with RISC V)
Cloud computing price is still based around (illegally monopolized and price fixed) memory prices, which is absurd because two load-balanced NVME disks are comparably as fast as DDR3 RAM.
DDR3 was 2007, DDR4 was 2014, DDR5 is supposed to be this year.
Anyway, I've been considering building some pcie/m.2 boards for a couple of markets because the price difference between a "consumer grade" board and the server/embedded board with nearly the same features but minus a couple important things for some markets is about $25 in parts, but the markup is about $500. Its even worse in some of the built for purpose devices where wrapping a bit of sheet metal around said machine adds another $2k+.
The m.2 vs U.2 market is such a shitshow at the moment. And if one of the major players decides to create a form factor that happens to be compatible with m.2? Well huge industry outcry because they might remove everyones fat margins on "enterprise" gear.
Intel hardly has an impregnable lead in this regard, but I expect AMD to get noticeable server market share before any ARM part does.
I've seen so many developers who can't understand that the average user isn't going to spend hours clicking through menus to find what they want.
Both Firefox and Chrome developer tools even have settings for throttling network speed. I wonder how many developers use them.
In other words, server hardware is usually designed for parallelism/maximum throughput, while client hardware is designed for single-threaded performance and decreasing latency.
Judging by the comments here this is not as obvious as I previously thought.
It's about costs.
> Why is firmware initialization getting so darn slow when computers are getting faster?
That alone has zero bearing with regard to the initialization process is it doesn't have to compute stuff, but wait for signals and much, much slower IO/memory.
First, there's the out-of-band management engine, which is technically in control of everything. The BIOS and the Lights-Out management system are interdependent. They will communicate with each other.
Just initialising this communication channel is more complicated that a normal computers entire BIOS.
Then there's activating every sensor and hardware device, most servers aren't actually the 2 x86_64 CPUs that are socketed to the motherboard, they're more like 30+ CPU's, various hardware controllers, including networks, fan controllers, drive controllers, power supply controllers.
Each of them also has firmware equivelant of a whole BIOS, and they also will communicate with each other.
Thirdly, every sensor/firmware/device test is synchronous and logged. That logging is painfully slow as it's logging via the out-of-band management engine and that engine is super tiny and low power.
Finally all that memory will be tested and not 'assumed' to be fine. Each individual DIMM is blasted with voltage to test if it's seated well, then there is some memory testing which is not only more extensive than the 'fast check' your laptop will do, it's more heavy than the "heavy" check your laptop will do.
There's a bit more to it too, like the fact that memory gets "extended" into the out of band system so that it can control VGA/Serial/USB.
I think the article is missing many key elements, for example you should always trottle your CPU when doing benchmark.
One managed to get a hold of a 'server' and we just assumed it had to be fast right? Very much learned the opposite....and the lack of a sound card was a big turn off...
Good article though. I'm sick of seeing comparative benchmarks on a MacBook. If you don't have real servers you should always benchmark your code in the cloud (bare metal instances if you can afford them).
Edit: If you wish to microbenchmark - lock the CPU frequencies (core/uncore for intel), lock the voltage too and measure the power draw as well. You wish to use taskset too, depending how many cores the benchmark utilizes.
While your code may look all nice and sane, not have any glaring performance issues - what you may not realise is that you're using a framework that does things in unexpected ways.
The devs I work with are running into the reality of this at the moment - they blame the servers/network/database/whatever as being slow/shit/etc.
I go take a look and see that network traffic is at capacity. They've got some 'magic' caching framework that promises to speed things up by storing data in Redis. What's happening in the background though is that this caching framework is doing dumb things like asking for the same key over and over again - so we've got a multi-Gbit stream of the same handful of keys being asked for thousands of times a second.
These are the sorts of things profiling can tell you just by looking at the amount of calls to Redis.
Eventually we got them online to do a screen share, and sure enough it took over a minute to render the page (it was a map). They were using an 8 year old CPU.
Switching them from IE6 to Firefox fixed the issue.
Other approaches taken have been the more Erlang style "let it fail" methodology which is fine for newer projects but represents a rewrite for most systems in practice and is thus far, far beyond profiling discussions.
gdb -p $PID
ctrl-c bt c ctrl-c bt c crl-c bt c ...
Having production quality hardware for the dev cycle is extremely valuable for these uses.
There’s been many times I’ve been bitten by this, including the one time we found that a small portion of users would set the number of results returned to the max and scroll through hundreds of pages of results, blowing the cache for everyone.
I tend to hear “we run performance tests so we don’t get regressions” a lot more than “we monitor the performance of releases to canaries and rollback”. It shouldn’t be one or the other, both are invaluable.
Yup, that sounds like me. I do exactly that whenever the pages are slow to load. Rather wait longer, once.
But they can have such a pricing model. What they offer is good and valuable anyway. And you need to pay Jeff Bezos.
"Hanging out in the old data center, rendering web pages for a thousand people simultaneously? A different story. For server workloads, it often makes sense to give up clock frequency to “fit” more cores in the same heat / power space."
Servers have larger caches, I'd expect better IPC than a laptop CPU from better micorarchitecture, at least double the memory channels etc. I guess that was his point though.
In aggregate yes the server cpu numbers are great. But looking at them per core makes them much worse. I checked some random Xeon Platinum CPU vs a mobile i7, both being Skylake (so essentially same microarch). The Xeon had 28 cores, 38.5M cache (=1.4M/core) and 6 memory channels(=0.2/core). In comparison the i7 had 4 cores, 8M cache (=2M/core) and 2 memory channels (0.5/core). The Xeon uses 25% faster memory, but that doesn't really make up the difference.
> But looking at [the server cpu numbers] per core makes them much worse
but for what benchmark? (sorry if you said and I missed it)
a lot of tutorials online is about people trying to get their raspberri pi to sync blockchains, so I was prepared for the worst
but then I put together an 8 year old desktop and it synced in 2 days
kind of underwhelmed at "cloud" options. but they work
Yes, I do. But as you say, it’s in circulation. I guess I dislike it in the same way that I consider ‘literally’ and ‘figuratively’ to be antonyms, but how the former has unfortunately come to be considered a synonym of the latter, which basically hobbles the language permanently.
If I say "I feel so embarrassed I could literally die", I am using literally in its proper sense, but hyperbolically. Just like if I say someone was "a mountain of a man" I am using the proper sense of "mountain", even though the man is not literally a mountain.
I'd rather say they were using "literally" as a meaningless intensifier. But here's the thing: We already have loads of intensifiers. But we don't have very many ways of saying, "I'm not speaking hyperbolically, this actually happened."
Think of all the words that, etymologically speaking, should mean "this actually happened", but in fact don't mean anything anymore: really, truly, definitely, and so on. The reason they didn't say "I feel so embarrassed, I really could die" is that "really" has lost its strength from overuse; now they've moved on and are trying to do the same thing to "literally".
"Literally" is my (figurative) line in the sand: This far and no farther. Language is defined by its speakers: I'm an English speaker, and so I get to vote on how the language is used. As such, I will continue to make fun of people who say "I could literally die" as long as it is possible, and I encourage everyone to do the same.
That is, maybe the former means "I could (figuratively) literally die", while the latter means "I literally (not figuratively) could die".
"I can't believe I did that in front of all those people -- I literally could die of embarrassment." "I can't believe I did that in front of all those people -- I could literally die of embarrassment". Those both sound like normal "meaningless emphasis" usages of the word 'literally'.
When you get to thinks like “She literally died” it becomes murkier. “I could literally die if I ate shrimp” is murkier still.
This is one of the many reasons I’d like a firm firewall between ‘figuratively’ and ‘literally’. It seems I’m constantly besieged by the “language evolves, deal with it” crowd, but what they don’t get is that it’s all fine and well when language evolves in such a way to become more precise (perhaps by adding terms that distinguish between things that were previously lumped together, such as ‘dumbphone’ and ‘smartphone’ splitting from ‘cellphone’, itself a portmanteau of ‘cellular’ and ‘telephone’, to distinguish it from a fixed line) or to make meanings quicker to convey in conversation (by abridging the latter to ‘convo’, for example), but the ‘figurative’ versus ‘literal’ debate is very different, because it’s one of those relatively few instances that add ambiguity, making meanings (at least potentially) harder to convey.
Strange how something "meaningless" can simultaneously be an intensifier.
People complaining about literally being watered down, literally need to chill. Go read a non-technical book or something and re/learn that language is absolutely unstrict. You can do whatever the hell you want with it and use words in ridiculous ways, and it's all valid. The only thing that matters is communication. If you understand that "I literally died when I saw it come off" and "he literally couldn't fit through the doorway for 20 minutes" have different uses of literally, what's the issue? You want every word to be a reserved keyword?
I literally think that’s impossible.
And I mean that literally; rigid educational systems have stamped the fluidity of language out of far too many people.
The point being that there’s definitely a threshold beyond which ambiguity of meaning makes parsing a sentence and resolving its meaning impossible. The more specific (and distinguishable) terms are, the less risk there is of a misunderstanding. This is Information Theory 101.
1. provide or give (a service, help, etc.). "money serves as a reward for services rendered"
2. cause to be or become; make. "the rains rendered his escape impossible"
3. represent or depict artistically. "the eyes and the cheeks are exceptionally well rendered"
You seem to be stuck on the 3rd definition (there are more, but 1, 2 and 3 cover everything we need here to see how it's appropriate based on both the server and client side actions.
The other way of looking to it is that the server renders [something] to HTML, and the client renders HTML to pixels.
It's quite common to refer to things being rendered to another forms, the term is not owned by processes with a visual output.
Quite possibly. I concede the point.
> It's quite common to refer to things being rendered to another forms
I think it’s my mathematical background. I tend to think of these kinds of processes as ‘transformations’.
While you can make various workarounds to rectify this, it still seems like "so make your machine the machine it runs on" is a very effective solution. Unlike the alternatives, once you commit to it, you can't forget or revert back to bad old patterns.
I've had this thought before: What if Amazon, one day, just decreed that all employees' laptops had to run Amazon Linux?
Maybe it's a good thing I'm not Jeff Bezos, but I think it would have a lot of positive effects.