>I think a while back TSMC finally understood that building a factory in the US is just not feasible
TSMC always understood this. This wasn't a realization as the cost benefit analysis is obvious: US workers don't have the skill involved and they demand higher pay. The combination of the two makes the US plant a net loss.
TSMC did what they did because of political pressure. So the plan was always for the US plant to just satisfy that political pressure as much as possible. There was never a plan for the US plant to do anything profitable, it's more of a forced "technology transfer".
It's nothing like a forced technology transfer at all. The US isn't acquiring TSMC tech in any manner what-so-ever. It could hack TSMC - as China does the US - if that's what it wanted.
The US is adding such domestic manufacturing for strategic national security reasons: namely, a modern tech-heavy economy can't function without the chips that power it. And yes, of course it pressured TSMC to contribute to that.
It's technology transfer. And it won't be obtained all through legal means.
Hacking isn't enough the amount of skill involved can't be gleaned from a computer file.
You need US based employees who can be poached who are doing espionage and all that. This is entirely what it's for. CIA and other defense agencies do this worse stuff. What I'm saying isn't out of the blue. And it's also quite obvious. There's really no real difference between manufacturing here or abroad so that is the only reason why they bring it here.
You're describing technology transfer from the US to Taiwan. Which is absolutely true and happened. But the literal fact that the US can't build what Taiwan builds shows it's currently a literal transfer in the Other direction.
What I don't understand, is how thr initial US transfer to Taiwan negates the technology transfer I'm describing here? It doesn't.
I think you lack objectivity. Your American pride is getting in the way. Same with the downvoters I guess.
My comment has nothing to do with whether or not Taiwan or the US deserves or does not deserve to be a participant or victim in this "technology transfer" it's just a statement about reality.
I used to use Personal Capital, but now I switched to SoFi Relay[1]
Personal Capital had problems maintaining connections to my accounts, especially to SoFi. Of course SoFi has no problems connecting to SoFi accounts. SoFi connects to 21 of my accounts; there's only 3 accounts that don't work: Apple Savings, Apple Card, and Treasury Direct.
I also wrote a web app to convert the SoFi relay summary into text that can be pasted into a spread sheet: https://tt.leftium.com/ (I just paste the HTML into the textbox, and the TSV data is copied to the clipboard)
I responded to one of their sales emails saying that I liked their service because it was free, and I wasn't interested in paying for their advice. Haven't heard from them since, but have been using the free service for years.
I switched from mint to personal capital years ago and I couldn't be happier. The UI is so much more responsive and the site is more reliable. The design is a lot better too.
I'm disappointed by how shallow even "in depth" reviews are that they don't mention this. A reclined position basically eliminates weight and balance issues. Additionally, using a traditional monitor in a reclined position is very difficult.
For Meta's Quest headsets, third party manufacturers sell solid "halo" head straps, which are much more comfortable by distributing the weight mostly on top of the head instead of just pressing the headset to the face. Basically imitations of Sony's PlayStation VR.
The top manufacturer is BoboVR, but they obviously haven't yet made one for the Vision Pro.
I don't get why Meta and Apple don't include this as the default, given that it's obviously the optimal solution. Then again, at least Apple even used a heavy and unnecessary metal frame in the headset, so ergonomics clearly isn't their top priority.
On the bright side, the AVP's "Lightning-like" connector for the arms means that it's at least theoretically possible for third parties to design whatever mounting hardware people want.
I too understand this logic and follow it to the T.
You know that indie filmmaker who spent his lifesaving filming a movie I now get to watch on his dime? Well guess what.
No 4k video and no international subtitles makes that guy deserve not seeing any money come back from his hard work.
I'm not a thief. The indie filmmaker is a thief. He stole my subtitles and 4k video.
In all seriousness, I pirate shit too. But am I going to walk around like a idiot justifying what I do? No. I don't lie to myself. I don't need to twist reality in order to explain human evil which is an intrinsic aspect of all of us.
I'm a bit like a psychopath because one other intrinsic aspect of humanity is that we lie to ourselves in order to justify our sins. I don't need to do that. I can pirate shit, and recognize the sin, and then continue pirating and screwing over that indie filmmaker. An ass hole never recognizes himself as the ass hole.
Like seriously the delusions are through the roof. The guy is literally pirating shit, and then calling the party he pirates shit from an "ass hole". If he just didn't buy their content he'd have justification, but he instead pirates the content and still calls them the "arse hole". Wake up. I hate corporations but we are the ones commiting the crime here.
"Indie filmmaker" is not going to be on Disney+ or AppleTV. If they get there, they are not "indie" anymore, by definition, they are corporate employees of a trillion-dollar corporation, and their income depends 100% on how they negotiated with the corporation and 0% on whether or not I watch that movie via AppleTV or via torrent. I have AppleTV subscription anyway (through one of the free offers) and I still may prefer to watch it via torrent because it's more convenient. So don't push that BS about robbing poor indie filmmakers. That's not what happening. What's happening is trillion-dollar corps dividing the market and trying to extract every single possible dollar of value from the clients.
> The guy is literally pirating shit,
No, he is literally not pirating anything, unless he's in Somalia and attacking a cargo ship right now. And yes, he has the full right to call the parties who produced the situation where torrenting is the most convenient way to consume content an asshole - because they are assholes. I remember the time where doing that was not necessary - to the point that I almost forgot how to do it at all - but then the assholes came and now you have to pay for 15 different services, with crappy apps and unskippable ads, so yes, it's assholery. And it has nothing to do with indie anything.
No no. If they own shit they have the right to do whatever they want. You have no right to steal their shit. They can charge 10 billion dollars for their stuff it doesn't matter.
You're a thief. Plain and simple. You just need to justify your delusion because you can't face reality.
I don't need anything like that, including paying any attention to an opinion of an internet ignoramus about what I am or am not. You can shove your moralization where the sun does not shine until you hear it click. I pointed out the deficiencies in your rants already, so I am done, and you can keep throwing names around as much as you want, nobody really cares.
Doesn't change a thing. Convenience doesn't matter. Owning a subscription and then subsequently pirating an illegal version (which I'm positive it's not all you're doing) doesn't mean fuck all. I own it, I want you to obtain said media through one venue. That's my fucking right. Even if that venue makes you jump through 30 hoops doesn't mean shit. You don't jump through the hoops your a fucking thief.
All you need to look at is the law. They'd throw you in jail if it didn't cost so much.
You're wrong about nobody caring. You care. That's why you got angry enough to reply. You feel fucking guilty and you're ashamed of being an ass hole thief. Deep down you know it and your getting angry at me because I'm deconstructing your delicately made fantasy world.
I'm the one who truly doesn't give a shit. How else can I criticize myself? I pirate without guilt. I recognize my crime but someone like you has to make up some fantasy in order to live with himself.
What gets me is when that fantasy not only validates your actions, but condemns the party you fucking stole from. That's a freaking joke. That's the epitome of delusional.
You seem to labor under the delusion that whatever is the current state of the caselaw is always the pinnacle of human moral development and doing anything any part of this vast (also incomprehensible and many times contradictory) array of regulations forbids, or failing to do anything it commands, is an ultimate moral sin because moral is whatever the local magistrate court says it is. I don't think it's the case, no matter how many ways of working the word "fucking" into a sentence you can demonstrate.
> They'd throw you in jail if it didn't cost so much.
They can throw me in jail for liking a tweet or wearing a wrong garment or ingesting a wrong plant. So what?
> You feel fucking guilty and you're ashamed of being an ass hole thief.
Thank you for telling me what I feel. How else would I find out? Please do tell me more about my feelings, I love it when people who know nothing about me still able to figure out everything about what I feel in each particular moment. They must be so smart and perceptive, it's a really enriching experience to interact with such people. My gratitude knows no bounds.
They spent their hard earned money to make shows you rip off for free. I pirate shit too. But I'm not going to say they they took a piss. And deserver the repercussions. That's backwards and illogical and lying to yourself.
We are the ones pissing and shitting on their faces. We are the wrong doers here.
Its a domain thing. And one domain in the world is expanding. Everyone in the world is becoming a web developer. Actually it already happened. Throw a dart at a group of software developers most likely that dart will hit a web developer.
Web developers can write shitty code because most of the time the bottleneck is in the database. You just need to write code thats faster then the database and you don't need to optimize beyond that.
Now all the optimizations center around pointless refactorings to keep up with the newest technology trend.
IME it's quite rare for the database to be the bottleneck. People just don't know how to use it right. It's a pretty simple optimization to gather web requests into batches, and that can easily 10x your database throughput. At my last job we had architects pushing to do the opposite and turn batch files into single requests! Argh!
Also if people are using RDS with EBS, they'll think storage IO is ~500x slower than a modern NVMe disk really is, which will warp their perception of how well an RDBMS should scale. Their gp3 SSD storage comes with 3k IOPS baseline up to 16k[0]. lol. "SSD storage". The volume size "scales" up to 16TB. You can get a new condition P5410 for $420 retail: 8 TB/drive with 100x the performance of a maxed out EBS volume.
Similar misconceptions must exist with application performance. Lambda advertises being able to scale up to "tens of thousands" of concurrent requests[1]. My 6th gen i5 can do that with a few GB of RAM allocated to a single JVM process...
Database is the primary bottleneck of almost all web apps. This is different from solving bottlenecks you may find in other places.
Let me put it this way. If you did everything right, then the slowest part of your web application is usually the database. Now you may find problems in the web application and fix bottlenecks there but that's not what I'm talking about. I'm talking about the primary bottleneck.
In web basically the database is doing all the work the web application is just letting data pass through. The database is so slow that the speed of the web application becomes largely irrelevant. That's why languages like ruby or python can be used for the application, that's why C++ is rarely needed.
This ultimately makes sense logically. The memory hierarchy in terms of speed goes from CPU cache to random access to fs with fs being the slowest.
Web applications primarily use fs as it's all just about manipulating and reading state from the db. while a triple A game primarily runs on random access. Games do use the fs but usually that's buffering done in the background or load screens.
This is why your reply doesn't refute a single thing I said. It doesn't matter if dbs use nvme. FS is still slower than an in memory store by a huge magnitude. Not to mention the ipc or network connection is another bottleneck. Web apps need to only be trivially made magnitudes faster then then the ipc and database and it's fine.
Your batch calls to the db are only optimizations to the db which is still magnitudes slower then ram. Try switching those batch requests to in memory storage on the same process and keep the storage from bleeding pages to the fs and that will be waaay faster.
After you fix that the bottlenecks of most web apps lie in the http calls and parsing and deserializarion of the data. But usually nobody in web cares for that stuff because like I said the db is way slower.
Do you think a game engine can afford to do this stupid extra parsing and serialization step in between the renderer and the world updater? Hell no. That's why web developers can put all kinds of crap in the http handlers, because it doesn't matter.
Though I will say I have seen a bottleneck where parsing was actually slower than access to redis. But that's rare and redis is in-memory so it's mostly the ipc or network connection here.
I don't know how your performance expectations are calibrated, but for example on my i5 (4 cores) using a SATA SSD, I can get ~100k "Hello World" web requests/second, and ~60-70k web requests that update the database/second. The database can do ~300k updates/second on my hardware by doing something like generating synthetic updates in SQL, or updating by joining to another table, or doing a LOAD DATA INFILE.
Obviously the app is the primary bottleneck (well, they both are; CPU time is the bottleneck. Using an NVMe disk doesn't move the needle much). That's without TLS on the http requests. Turns out json parsing has a noticable cost.
Meanwhile I see posts about mastodon running into scaling issues with only a few hundred thousand users. Are they each doing 1+ toot/second average or something? 'cause postgres should not be a bottleneck on pretty much any computer with that few users. Nothing should be a bottleneck at that level.
Db has to do io too which you likely aren't measuring.
You are prob doing 300k writes with only one io call to indicate 300k was done. Then for the web app your doing 100k io calls. If you want to do an equivalent test on the web app you need to have the web app write to in memory like 300k times on one request. But that's not the best way to test.
The full end to end test is the io call to the web app then processing in the web app then the io call from the web app to the db then processing in the db, then the return trip.
Picture a timeline with different colored bars of different length with the length indicating the amount of time spent in each section of the full e2e tests. You will find that the web app should be fastest section. (It should also be divided into two for the initial request and the return trip with db access in between)
Flamegraph generators can easily create this visualization. Also be sure to handle what the other replier said as well. Make sure the db isn't caching stuff.
I would say a read test here is a good one. The web app parses a request, translates it to SQL, the. The SQL has to join and search through some tables and deliver results back to the user.
I would run the profiling with many simultaneous requests as well. This isn't fully accurate though as write requests lock sections of the db which actually are a big slow down as well which may be too much work to simulate here.
My point is instead of doing 100k transactions in your web app, you should look at how to gather them into batches. Think of how an old school bank mainframe programmer would do something, then realize you can do that every couple milliseconds so it feels realtime.
If you submit a batch every 5ms, then on average you are adding 2.5 ms of latency per request sitting in the batch buffer. But with 100k requests/second for example, you are getting batches of 500, which will get a lot more out of your database. Realistically, most people have far fewer than 100k requests/second, but the idea works at lower levels too. Even batches of 10 will give you a good boost. If you don't have enough requests/second to put together 10 requests/5 ms batch (2k req/s), then why worry about bottlenecks?
Wall time spent on a single request is the wrong way to understand performance for scalability. You can amortize wall time across many requests.
Also your db should be caching stuff for many workloads. Reddit gets about 80 GB/month of new posts/comments based on scraped dumps. An entire month of threads should fit in buffer pool cache no problem. If they really wanted to, their whole text history is only ~2.5TB, which you can fit in RAM for a relatively small amount of money compared to an engineer's salary. They should be getting very high cache hit ratios. Workloads with smaller working sets should always be cached.
> My point is instead of doing 100k transactions in your web app, you should look at how to gather them into batches.
This sounds odd to me. Assuming 100k independent web requests, a reasonable web app ought to be 100k transactions, and the database is the bottleneck. Suggesting that the web app should rework all this into one bulk transaction is ignoring the supposed value-add of the database abstraction and re-implementing it in the web app layer.
And most attempts are probably going to do it poorly. They're going to fail at maintaining the coherence and reliability of the naive solution that leaves this work to the database.
Of course, one ought to design appropriate bulk operations in a web app where there is really one client trying to accomplish batches of things. Then, you can also push the batch semantics up the stack, potentially all the way to the UX. But that's a lot different than going through heroics to merge independent client request streams into batches while telling yourself the database is not actually the bottleneck...
There aren't really heroics involved in doing this. e.g. in a promise-based framework, put your request onto a Queue[(RequestData, Promise)]. Await the promise as you would with a normal db request in your web handler. Have a db worker thread that pulls off the queue with a max wait time. Now pretend you received a batch file for your business logic. After processing the batch, complete the promises with their results. The basic scaffolding is maybe 20 LoC in a decent language/framework.
Much easier than alternatives like sharding or microservices or eventual consistency anyway.
I think somewhere I have a more built-out example with error handling and and where you have more than just "body" in the model. In the real world the business logic for processing the batch and error handling is going to be a decent amount more complicated. etc. etc. But the point is more about how the batching mechanic works.
The batch request just eliminated io. It doesn't change the speed of the database overall. It would make that e2e test I mentioned harder to measure as how would you profile the specific query related to the request within that batch? I can imagine an improvement in overall speed, but I don't think this is a common pattern and the time spent in the db will still be slower than the web app for all processing related to the request.
Also for the Cache... Its a hard thing to measure and define right? Because it can live anywhere. It can live in the web app or on another third party app and depending on where it is, there's another io rt cost.
Because of this Usually I don't classify the cache as part of the db for these types of benchmarking. I just classify actual hits to the fs as the db bottleneck.
I mean if everything just hits an in memory cache that's more of bottleneck bypass in my opinion. Definitely important to have cache but measuring time spent in the cache is not equivalent to measuring where the bottleneck of your application lives.
> Web developers can write shitty code because most of the time the bottleneck is in the database. You just need to write code thats faster then the database and you don't need to optimize beyond that.
Is the wrong way to look at things. Shitty code might bottleneck because of the way it uses the database. But that's like saying "you can write shitty code because it will bottleneck on global locks". But you can write better code that uses fine-grained locks or read-write locks or something, or uses a lock-free algorithm, and now it's not your bottleneck. Or you could write shitty code that bottlenecks on single byte unbuffered IO, or you could not do that and not have that bottleneck. It's the exact same idea, really. Write code with more efficient access patterns, and your database won't be as much of a bottleneck.
To say something is a bottleneck, you need to look at what it's capable of under optimal usage patterns. If you have 1TB of data to transfer, and you have a 10 Gb/s link, it's going to take you a little while. If you have 100 MB of data, but you have a tiny receive window and send small packets, it might take you a while, but you're not bottlenecking on the network. Your code just isn't using the network well.
And in the real world, if your working set is smaller than a few TB, then you shouldn't be doing disk IO on your read workloads. You definitely shouldn't be doing read IO if your working set is in the 10s of GB or less. That's not a "bypass" if that's how real-world performance works. Don't run your database on a phone with 8 GB of RAM. Batching writes will cut down on fsync calls for the WAL, so you'll get better real-world performance with actual databases.
You're right that it's not a common pattern among web developers. That's why I'm bringing it up. It's not hard, but it's also not talked about (it is known among lower level programmers obviously. e.g. they're generally not doing unbuffered single byte file IO).
I'm not saying you can write ANY code and code so shitty that it's slower than the database. Heck you can have the handler sleep for a minute before forwarding the request to the DB. I obviously don't mean that.
I'm talking about a specific kind of shitty code in the sense you don't have to worry about move semantics, memory management. You don't have to preallocate memory, you don't have to think about a lot of stuff and optimize for the heap or the stack. That kind of thing.
Just write some trivial non-blocking code don't worry about anything else and you're overall good. I guess "shitty code" is the wrong choice of words here. You don't need to spend time optimizing is more what I mean. If you know what you're doing it's fine... no major effort needed to change things.
> Web developers can write shitty code because most of the time the bottleneck is in the database.
That is because most of the time web developers are bad at database things, it isn't an intrinsic property of database engines.
A modern database engine on a single AWS VM can readily support 10M writes/sec through disk storage, not even in memory. And run operational queries against that data at the same time. Most web apps don't have requirements anywhere close to that. In practice, you are much more likely to run out of network bandwidth to the database than database throughput if your systems are properly designed. Even the database engines themselves are usually bandwidth bound these days.
It is an intrinsic property of database engines. Database engines access the fs. That is the slowest part of memory in a computer. The web app is stateless, it's never suppose to touch the fs.
Additionally database engines usually exist as separate processes or servers necessitating need for ipc which is another intrinsic bottleneck.
If an AWS vm can support 10 million writes/sec to disk storage then a stateless web app on the same vm should be even faster doing the same reads and writes to in memory storage.
I can agree with your latter statement that io can become the bigger bottleneck these days.
You do not understand how modern databases actually work.
Databases don't need to access the filesystem, fast ones work with the block devices directly. The slowest part of modern hardware is the network, not the storage. IPC performance isn't a real issue. Databases do their own I/O and execution scheduling, that is how they achieve extremely high write throughput. Unless your web app is designed this way (it isn't), you cannot achieve anything close to the throughput of a modern database engine.
Performance is a product of software architecture. Being stateless does not make your software fast in any absolute sense, many stateless in-memory systems have mediocre performance. A disk-backed design with superior architecture can out-perform an in-memory design, both in theory and practice.
DBMSs do not bypass filesystem. If this was the case, the table names would not be case-insensitive under Windows and case-sensitive under Linux (in MySQL). What they do is to allocate large space on the file system (by the way, the data is still visible as a file / set of files in the underlying operating system) and manage internal data structure. This lower the fragmentation and the overall overhead. In a similar way cache systems works - Varnish allocates entire memory it needs with a single call to operating system, then maintains internal data structure.
>Unless your web app is designed this way (it isn't), you cannot achieve anything close to the throughput of a modern database engine.
Your saying if I write to a section of memory on the heap or stack 4000 times with some different random byte every time it will be slower than doing the same thing to a db? Let's be real.
>Performance is a product of software architecture. Being stateless does not make your software fast in any absolute sense, many stateless in-memory systems have mediocre performance. A disk-backed design with superior architecture can out-perform an in-memory design, both in theory and practice.
Uh fundamental performance of software is absolutely limited by hardware. Stateless removes some fundamental limits. Sure architecture can change things but not not absolutely. Given the best architecture for all cases the best possible performance is in the end determined by which one is stateless. The absolute speed in the end is determined by hardware. SW architecture is changeable and thus NOT absolute.
I would know I work in HPC. We don't have any databases in any of our processing pipelines for obvious reasons.
Optimization has taken a back-seat now, I'd say. We focus more on developer productivity, and that extra mile optimization isn't deemed necessary if that effort and time can be put toward another project, squeezing out more value from the developer.
His credentials indicate that it may be possible that his arguments are based on data while your credentials and evidence indicate personal, anecdotal experience. Therefore I would trust his reasoning more. Additionally, I personally identify with it.
I mean a git developer finds git easy to use? That's biased data.
I love how both of you dropped your street cred before launching into your reasoning. It just shows how much more credentials convinces people rather then the argument itself. Normally that stuff logically doesn't matter and people are just doing it to grab some "authoritah" but in this case your backgrounds actually contributed to the arguments.
The foundation of simulation theory relies on a quantitative probability argument. It says by extremely high probability we live in a simulation. This is the logic that is hard to dispute. Your arguments here are not addressing that.
Weirdly it sort of relies on moores law. Just look it up. If you want to refute the theory you need to attack the main argument. The main argument sounds wrong but at the same time is hard to logically unjustify.
No read the wikipedia on it. They use probability to prove it's basically true. That is the argument that is hard to argue against and the one Elon goes on about. It sounds wrong but it's logically hard to show why.
The argument relies on a couple of assumptions which are not obviously true (they're not obviously false either). That's where most of the criticism of it is aimed.
In a simulation probability must be itself simulated. With enough simulations the actuality of an accurate version of probability being simulated is low. There are a million different ways and axioms we can use to change and modify probability in a simulation. Thus every reality could have a different probability and you cannot rely on probability to make your conclusions.
Therefore we cannot make any conclusion here about simulations.
TSMC always understood this. This wasn't a realization as the cost benefit analysis is obvious: US workers don't have the skill involved and they demand higher pay. The combination of the two makes the US plant a net loss.
TSMC did what they did because of political pressure. So the plan was always for the US plant to just satisfy that political pressure as much as possible. There was never a plan for the US plant to do anything profitable, it's more of a forced "technology transfer".