Being able to avoid an extra copy is actually a huge performance gain when you can safely do it. You shouldn't discount how useful mmap is just because its not useful in every scenario.
You shouldn't replace every single file access with mmap. But when it makes sense, mmap is a big performance win.
This reads like complete nonsense. If HTTP is involved, lets just give up and make the system as slow as possible?
The HTTP request needs to actually be actioned by the server before it can respond. Reducing the time it takes for the server to do the thing (accessing files) will meaningfully improve overall performance.
Switching out to JSON will meaningfully degrade performance. For no benefit.
> If HTTP is involved, lets just give up and make the system as slow as possible?
Did i write that? Please leave flamebait out of these discussions.
The original author (today) answered why they wanted to use this approach and the benefits from it. This has been missing in this entire discussion. So i really do not understand where you get this confidence.
> Switching out to JSON will meaningfully degrade performance. For no benefit.
Without knowing why or how the system was used, and now we know it is used as a transport medium between the db/nodes, its more clear as to why json is a issue for them. Does not explain how you conclude it will "meaningfully degrade performance" when this information was not available to any of us.
The differential on an EV is the same as on an ICE car. It does the same job either way, it doesn't care whether the power source is gas or electricity.
But on an EV, that's basically the only thing that needs somewhat regular "oil changes". Whereas ICE motors & transmissions also need fluid changes regularly.
> QUIC is meant to be fast, but the benchmark results included with the patch series do not show the proposed in-kernel implementation living up to that. A comparison of in-kernel QUIC with in-kernel TLS shows the latter achieving nearly three times the throughput in some tests. A comparison between QUIC with encryption disabled and plain TCP is even worse, with TCP winning by more than a factor of four in some cases.
Jesus, that's bad. Does anyone know if userspace QUIC implementations are also this slow?
I think the ‘fast’ claims are just different. QUIC is meant to make things fast by:
- having a lower latency handshake
- avoiding some badly behaved ‘middleware’ boxes between users and servers
- avoiding resetting connections when user up addresses change
- avoiding head of line blocking / the increased cost of many connections ramping up
- avoiding poor congestion control algorithms
- probably other things too
And those are all things about working better with the kind of network situations you tend to see between users (often on mobile devices) and servers. I don’t think QUIC was meant to be fast by reducing OS overhead on sending data, and one should generally expect it to be slower for a long time until operating systems become better optimised for this flow and hardware supports offloading more of the work. If you are Google then presumably you are willing to invest in specialised network cards/drivers/software for that.
Yeah I totally get that it optimizes for different things. But the trade offs seem way too severe. Does saving one round trip on the handshake mean anything at all if you're only getting one fourth of the throughput?
Are you getting one fourth of the throughput? Aren’t you going to be limited by:
- bandwidth of the network
- how fast the nic on the server is
- how fast the nic on your device is
- whether the server response fits in the amount of data that can be sent given the client’s initial receive window or whether several round trips are required to scale the window up such that the server can use the available bandwidth
It depends on the use case. If your server is able to handle 45k connections but 42k of them are stalled because of mobile users with too much packet loss, QUIC could look pretty attractive. QUIC is a solution to some of the problematic aspects of TCP that couldn't be fixed without breaking things.
The primary advantage of QUIC for things like congestion control is that companies like Google are free to innovate both sides of the protocol stack (server in prod, client in chrome) simultaneously. I believe that QUIC uses BBR for congestion control, and the major advantage that QUIC has is being able to get a bit more useful info from the client with respect to packet loss.
This could be achieved by encapsulating TCP in UDP and running a custom TCP stack in userspace on the client. That would allow protocol innovation without throwing away 3 decades of optimizations in TCP that make it 4x as efficient on the server side.
Is that true? Aren’t lots of the tcp optimisations about offloading work to the hardware, eg segmentation or tls offload? The hardware would need to know about your tcp-in-udp protocol to be able to handle that efficiently.
Most hardware is fairly generic for tunneled protocols, and tx descriptors can take things like "inner l4 header offset/len" and "outer l4 header offset/len"
Generic support for tunneled TCP is far more doable than support for a new and volatile protocol.
> - avoiding some badly behaved ‘middleware’ boxes between users and servers
Surely badly behaving middleboxes won't just ignore UDP traffic? If anything, they'd get confused about udp/443 and act up, forcing clients to fall back to normal TCP.
Your average middlebox will just NAT UDP (unless it's outright blocked by security policy) and move on. It's TCP where many middleboxes think they can "help" the congestion signaling, latch more deeply into the session information, or worse. Unencrypted protocols can have further interference under either TCP or UDP beyond this note.
QUIC is basically about taking all of the information middleboxes like to fuck with in TCP, putting it under the encryption layer, and packaging it back up in a UDP packet precisely so it's either just dropped or forwarded. In practice this (i.e. QUIC either being just dropped or left alone) has actually worked quite well.
Yes. msquic is one of the best performing implementations and only achieves ~7 Gbps [1]. The benchmarks for the Linux kernel implementation only get ~3 Gbps to ~5 Gbps with encryption disabled.
To be fair, the Linux kernel TCP implementation only gets ~4.5 Gbps at normal packets sizes and still only achieves ~24 Gbps with large segmentation offload [2]. Both of which are ridiculously slow. It is straightforward to achieve ~100 Gbps/core at normal packet sizes without segmentation offload with the same features as QUIC with a properly designed protocol and implementation.
Yes, they are. Worse, I’ve seen them shrink down to nothing in the face of congestion with TCP traffic. If Quic is indeed the future protocol, it’s a good thing to move it into the kernel IMO. It’s just madness to provide these massive userspace impls everywhere, on a packet switched protocol nonetheless, and expect it to beat good old TCP. Wouldn’t surprise me if we need optimizations all the way down to the NIC layer, and maybe even middleboxes. Oh and I haven’t even mentioned the CPU cost of UDP.
OTOH, TCP is like a quiet guy at the gym who always wears baggy clothes but does 4 plates on the bench when nobody is looking. Don't underestimate. I wasted months to learn that lesson.
From what I understand the ”killer app” initially was because of mobile spotty networks. TCP is interface (and IP) specific, so if you switch from WiFi to LTE the conn breaks (or worse, degrades/times out slowly). QUIC has a logical conn id that continues to work even when a peer changes the path. Thus, your YouTube ads will not buffer.
Secondary you have the reduced RTT, multiple streams (prevents HOL blocking), datagrams (realtime video on same conn) and you can scale buffers (in userspace) to avoid BDP limits imposed by kernel. However.. I think in practice those haven’t gotten as much visibility and traction, so the original reason is still the main one from what I can tell.
MPTCP provides interface mobility. It's seen widespread deployment with the iPhone, so network support today is much better than one would assume. Unlike QUIC, the changes required by applications are minimal to none. And it's backward compatible; an application can request MPTCP, but if the other end doesn't support it, everything still works.
It has good properties compared to tcp-in-tcp (http/2), especially when connected to clients without access to modern congestion control on iffy networks. http/2 was perhaps adopted too broadly; binary protocol is useful, header compression is useful (but sometimes dangerous), but tcp multiplexing is bad, unless you have very low loss ... it's not ideal for phones with inconsistent networking.
because it _does_ provide a number of benefits (potentially fewer initial round-trips, more dynamic routing control by using UDP instead of TCP, etc), and is a userspace softare implementation compared with a hardware-accelerated option.
QUIC getting hardware acceleration should close this gap, and keep all the benefits. But a kernel (software) implementation is basically necessary before it can be properly hardware-accelerated in future hardware (is my current understanding)
To clarify, the userspace implementation is not a benefit, it's just that you can't have a brand new protocol dropped into a trillion dollars of existing hardware overnight, you have to do userspace first as PoC
It does save 2 round-trips during connection compared to TLS-over-TCP, if Wikipedia's diagram is accurate: https://en.wikipedia.org/wiki/QUIC#Characteristics That is a decent latency win on every single connection, and with 0-RTT you can go further, but 0-RTT is stateful and hard to deploy and I expect it will see very little use.
QUIC performance requires careful use of batching. Using UDP spckets naively, i.e. sending one QUIC packet per syscall, will incur a lot of oberhead - every time the kernel has to figure out which interface to use, queue it up on a buffer, and all the rest. If one uses it like TCP, batching up lots of data and enquing packets in one “call” helps a ton. Similarly, the kernel wireguard implementation can be slower than wireguard-go since it doesn’t batch traffic. At the speeds offered by modern hardware, we really need to use vectored I/O to be efficient.
I would expect that a protocol such as TCP performs much better than QUIC in benchmarks. Now do a realistic benchmark over roaming LTE connection and come back with the results.
Without seeing actual benchmark code, it's hard to tell if you should even care about that specific result.
If your goal is to pipe lots of bytes from A to B over internal or public internet there probably aren't make things, if any, that can outperform TCP. Decades were spent optimizing TCP for that. If HOL blocking isn't an issue for you, then you can keep using HTTP over TCP.
Aeron is very popular in large financial trading systems. Maybe since multicast is already commonplace (that's how most exchanges distribute market data).
The key is that blibbe is talking about switches. Modern switches can process packets at line rate.
If you're working in AWS, you almost certainly are hitting a router, which is comparably slower. Not to mention you are dealing with virtualized hardware, and you are probably sharing all the switches & routers along your path (if someone else's packet is ahead of yours in the queue, you have to wait).
"Everything is political" is such a boring tautology.
Everything exists within the political climate of modern society. Institutions are forced to navigate the political landscape in which they exist.
But that does not make the institutions political in nature. There is absolutely nothing political about studying the mating patterns of beetles or the composition of rocks.
When people say that SA is being political, they mean that SA is using science to thinly veil their political activism. That's very different from your definition of "political"
The word “political” is rife with confusion. Careful discussion requires slowing down long enough to make sure different people are talking about the same thing.
One of my favorite definitions of politics is the set of non-violent ways of resolving disagreements, whether interpersonal, organizational, or governmental.
Others may reserve the word politics to only apply to governmental issues, campaigning, elections, coalition building, etc.
P.S. Language is our primary method of communication. Ponder this: why are people so bad at it? Do people really not understand that symbols can have different meanings? Do they forget? Do they want to get peeved because they want to think that other people don’t know what words mean?
> "Everything is political" is such a boring tautology.
1. The comment above didn’t say “Everything is political”.
2. "Everything is political" isn’t true. One might say that many things are influenced by politics; that’s fine, but downstream influence is neither pure single-factor causality nor equality.
3. "Everything is political" isn’t a tautology either.
Support for #2 and #3: There are things in the universe that existed prior to (and independent of) politics, like the Earth. There are phenomena influenced by politics but not inherently political, such as the phenomena of global warming or measuring the level of inflation. What to do about global warming or inflation is political, if you are lucky, meaning you have some persuasive influence at all (not the case in a dictatorship) and/or don’t have to resort to violence.
I believe you're nit-picking instead of interacting with the content of my comment.
OP did not literally say "Everything is political", they said "There are no apolitical institutions". Which is functionally the same thing. "Everything is political" is a common phrase used to express a common school of thought, [1] for example. I was interacting with this school of thought directly in my comment.
I agree with you that "Everything is political" is not true. But tpm is arguing the opposite.
"Everything is political" is a trivially true statement when using tpm's definition of "political", which is the point I was trying to get across. tpm is claiming that any institution which interacts with the government in any way is political in nature. This means that even the rocks and trees and oceans are political, because they are at the mercy of government policy.
I am arguing against this definition of "political".
Here, I'm thinking out loud. Are "Everything is political" and "There are no apolitical institutions" are functionally the same thing?
When I read "everything is political", I interpret that as meaning "all human interactions involve power relations, competing interests, and/or resource allocation".
When I read "there are no apolitical institutions", I interpret that as meaning "all institutions are downstream of politics (meaning government, whatever its form)".
I think it is useful to differentiate between the two phrases and their meanings. But of course they are closely related. Beyond each of us understanding what the other means, I'm not sure we're making specific enough claims to warrant litigating if "they are functionally the same". It seems like a contextual and subjective choice of where to draw a line. Feel free to say more if I'm missing something.
> tpm is claiming that any institution which interacts with the government in any way is political in nature
I am arguing that any institution is political by its very existence. Even if the true nature of the institutions is hidden by the current regime, as it is often the case in the West.
The funniest thing, of course, is that we are arguing under an article containing a political attack in the political magazine Reason, published by the political Reason Foundation. That's not the ideal starting point if you want to prove the possibility of apoliticalness of anything.
Can you define "institution" and "political" for me, then?
I would argue that there is nothing political about a local bakery, for example. Just a dude making some cakes. He may occasionally be forced to interact with the government, but his bakery as an institution has nothing at all to do with government organizations or political theory. By its nature, a bakery is apolitical.
https://en.m.wikipedia.org/wiki/Institution is as good as any. I would not consider a small (one person or family) bakery an institution. A large one (measured by number of employees etc) would be an institution, and defining the threshold is not important here.
Political - relating to the government or public affairs of a country
My argument is that every institution is political whether it wants or not.
Bakery is very obviously political because everyone tends to eat food and as such food is an evergreen political theme. Perhaps this is more visible in some countries than others, for example in a neighboring country the price of butter is a quite common item in TV news (really), and it's not a poor country.
But also other than that, a few years ago there were some articles about a bakery that refused to bake a wedding cake for gays, and it was a public affair for a few weeks. Is that political enough for you?
I just think we are talking about different things. I hear what you are saying, but I don't think that bakeries being tangentially related to politically charged topics make them a political institution.
Bakeries also handle and store money, but that doesn't make them a bank. etc. The nature of bakeries as an institution is not political - they are not concerned with the organization of government and policies. They may interact with the government but that doesn't make it a political institution.
This started as a discussion about whether not-primarily-political institutions (like Scientific American) should have and publish political opinions. It was started by an attack of a political institution (Reason) saying they should not. That attack itself makes the target politically relevant.
Bakeries are in a similar position. Once an owner declines to serve a customer based on his (owner or customer) political leaning, it's politically relevant. If a politican attack bakers because (he feels that) the bread price is too high, it's politically relevant.
I think there was an American civil rights movement in the 60's which was in a great part about equal access to services for all ethnicities. Was that not political?
> they are not concerned with the organization of government and policies
'or public affairs'. You wanted a definition and then you are ignoring it?
I read tpm's core points as (1) all institutions are downstream of politics (meaning government, whatever its form) and (2) Therefore, don't take institutions for granted; they rely on compatible upstream governance. I think tpm most wanted to impress the second point upon readers.
When reading dahfizz's comment ""Everything is political" is such a boring tautology."... (a) I didn't see how a point being boring has any bearing on tpm's second point; (b) So I couldn't tell if dahfizz agreed or disagreed with tpm's second point; (c) As a result, dahfizz's comment felt nit-picky to me.
Meta-commentary: It would seem that dahfizz and I both feel like the other is being nitpicky. It seems to me this is a signal that some kind of breakdown is happening on at the conversational level.
"There is absolutely nothing political about studying the mating patterns of beetles"
It will be used as an example of how we are wasting tax money by politicians. It will be used as an example of how homosexuality is natural by one side, and then it will be used as an example of how science is used to "groom" children by the other. There will be fights about whether it should be in school books, and then some states will ban all school books that mention that research, and then publishers will be forced to remove it to still have enough of a market for their books. The authors will be called out on Twitter and receive death threats, their university will cut their funding to avoid the controversy, some students will complain about it, and then that will be used to show how universities indoctrinate our kids.
And so on.
That's what "everything is political" means. When people say things like "get politics out of x," they really mean "make x match my politics", because there's no such thing as "no politics."
The important distinction is that it is possible, and should be the expectation, that you can study beetles and publish the results without any sort of political motivation or bias.
In that sense, it is perfectly possible and reasonable to "take the politics" out of scientific research. Simply do the research and publish the results. There absolutely is a thing as "no politics".
Once the results are out in the world, politicians and pundits are going to talk about it. That doesn't make the science itself a political act.
Yes, neutrality is an important principle: we want a study to proceed without outside influence.
Yet, there is an additional point worth mentioning: to the extent public money is allocated to e.g. study beetles, it is downstream of a political process. Meaning, there was allocation of resources that allows the study to proceed.
>> "Simply do the research and publish the results"
> And then you don't get any grants anymore.
This is exaggerated to make a point, which I interpret as: savvy researchers are mindful of how to conduct their work and communicate their results so they get more grants in the future. To what degree does this distort or corrupt an ideal research process? This is complicated. Political economists often frame this as a principal-agent problem. Organizational theorists discuss concepts such as resource dependence. (What other concepts would you include?)
> When people say that SA is being political, they mean that SA is using science to thinly veil their political activism. That's very different from your definition of "political"
Could you provide some examples? TFA seems to link to opinion pieces at Scientific American and not actual research, so I'm a little unclear.
> There is absolutely nothing political about studying the mating patterns of beetles or the composition of rocks.
Well, what about studying the mating patterns of humans, studying the decisions to abort, studying the decisions to change gender? Still not at all political in your country? Then, who decides if a study gets funding, who decides if it is ethical, who decides if the results can get published? It's all political decisions around the 'pure' science, which is why I mention different political regimes where stuff like this is often completely explicit unlike in more free societies where it may look like it's free of politics.
> they mean that SA is using science to thinly veil their political activism
And they should be glad, not complaining. Everyone is using their position for political activism, business owners, unions, all sorts of organisations, churches etc. There is no reason SA shouldn't do that.
Of course they only complain because they don't agree with SA.
Scientific research is apolitical. Even the act of studying abortion or transgenderism is not inherently political.
Just because scientists have to occasionally interact with political institutions does not make Science itself a political institution. Science is fundamentally apolitical.
I don't believe anyone here believes that scientific research is political. But how a society funds, publishes, and integrates scientific research is deeply political.
Yeah, this is also a big concern of mine. Nuclear weapons haven’t been used since ww2, but there also hasn’t ever been total war between two nuclear powers.
The current climate in Russia and the Middle East may change that.
You shouldn't replace every single file access with mmap. But when it makes sense, mmap is a big performance win.