I folks, some confusion that may have been zero overhead is better than zero copy, so it's
zero copy plus plus.
It's, I'm giving the stock under the SDS, not because the first use cases I have
for it is for the, for the self file system and for any software-defined file system as well,
right?
But it's a generic infrastructure for zero overhead, my goal.
We look at the motivation, why copy is bad, I hope everyone knows why, but, you know,
I'll say a few words, a protocol solution, you'll go through a demo that I have, it's on
GitHub, I'm not sure it compiles, it's a good luck, it will improve in your course.
And I'll be talking about the usage, right, or how we, I'm playing to you.
So that I'm movement that, and we're going to focus on a very specific location on the
boundary between the kernel and the user space, right?
So when you receive data or send data, of course, the kernel uses space boundary and by
it's removing, my, your cache gets polluted, your cycles are getting wasted, and it's,
it's been on your performance.
So copy is bad, it's not used.
Usually what we have, as I mentioned, you will have this, a neat network interface card,
you know, it actually does move data, it does use some of the bugs, but we're talking
about the CPU, right?
So you'll have the kernel buffer, and you'll have one copy into the user, and for example,
for the focus of a desktop today, and this still, we're talking about proxy systems.
So for something like a Ganesha, or, you know, something easier, like,
managed to write something, or a CBIN, that's a better example, where you have data that you
want to cache on your side, and then for it, right?
So when you are not actually interested in the data itself,
but rather you're a proxy system, you have data coming in, and you have to send it out.
Once or twice, or how many times that you would like,
but none of the times you're actually interested in reading the information itself.
So if you don't, you don't interested, let's see if we move this capability, what we can get,
and we can get a lot, right?
So usually, you'll have this buffer, you copy into the user,
you cache it if it's a CBIN, or some kind of cache, and then you copy it back each and every time
when you have to send it, right?
So how many CPU cycles?
A lot, it depends a lot on the speed of your network archive.
So the working size of your memory really matters.
So it's kind of, it's a number, it makes sense, but really depends on a lot of different factors
on how much memory you're using.
When you're not copying data, you're using much less memory,
or fewer bytes, so this will improve your performance.
The lot, again, depending on your exact use case.
So what's your overhead elements, and why I'm calling it zero overhead,
you know, zero copying?
Usually have copies, but you do have a message,
zero copy, and other stuff inside the account today, already.
They all have their own problems, right?
They inefficient in some ways, they're trying to remap your page tables on the fly,
and it hurts performance, right?
So with zero overhead, it means your information moves from the Nick to
and back to itself, basically, without any overhead, just the control plane,
and your data plane doesn't move any bytes, and it doesn't manipulate any metadata
that you would need in order to avoid moving bytes.
It's just there, right?
So now that you're aware of the magical capabilities of our solution,
let's kind of see what it actually does.
Okay, actually, repeating myself here.
So the idea is that because you're not moving data,
you actually keep the data inside the account, right?
It stays inside the account, it stays inside the account, it stays inside the account buffers.
You, as the proxy system, only a handler, and you're kind of offset and size,
which you want to do when it's sent, right?
So we only have the buffer, it is socket IDs,
offset and left as I mentioned.
There are no pointers to the data, the handlers that you can use,
you know, to address the data and say, here, I'm sending it,
this, it's a handler, not a pointer, right, because you can't actually access it.
And all the kernel IO happens exclusively inside the kernel, right?
User space, in this example, we're using IO-uring to communicate with our
kernel driver, that does it.
I will give an example of a specific, specific use case, a bit later, right?
So what the user does do, right?
So we allocate buffer handles, this is a solution to a problem that we have today.
Mainly, we kind of make sure that there is a slot in our kernel
driver space to for allocated buffers.
It's just to make sure that we can manage our memory in a good way.
We can get back pressure in the kernel sockets and things don't explode.
It's not in necessity, it's a solution today, right?
In a good way, we just, you know, we still pack it and get a pointer or a way of
addressing your bytes in a way that the kernel in the sense, right?
But today we pre-allocate the buffers and we know
which, the buffers are actually descriptors, right? We'll pre-allocate descriptors.
And we have them ready and we know that the TCP sockets can handle it and we can manage them.
I'll give an example, it's a bit abstract.
We create and manage sockets, but we, again, the sockets, we are using our kernel sockets.
So we have a kernel driver that creates kernel sockets and what you have in use space
is an obstruction. We have this library that gives you, it provides you a socket like a API.
But the sockets themselves that are using, you know, TCP, you to people, whatever you like,
answer the kernel, right? So we get received completionifications and you can request
to get a peak inside the data that you're seeing, right?
Because when you receive data, you may want to look at the headers, for example, right?
And if it's kind of type of TLV information, right? This is what you got.
This is the size of it and you know, the offset of whatever you want to do, right?
You don't actually need to see the whole data, you might need to see parts of it, like, small parts of it.
And so, but you can access the data in any way, right?
This is the kernel architectural, basically, as I've described, you have this DevSafeK process.
Hender, like, a fuse, and you have this buffer pool inside the kernel.
You have the socket manager and you have kind of a zilcopy iron engine, it's kind of an obstruction pins.
That there are changes to be made inside the kernel sockets, or actually, oh, oh, okay.
Now this class is a bit later, it's a bit one like to talk about it, but that's the architecture.
You have the kernel sockets, you have the buffers, and they have the application that one of the uses potential use cases is a fuse.
Again, we'll discuss it a bit later, we have the handlers, handles, you know, can create it,
and we have the actual binaries, the library for, for, for interaction, we work kernel device.
So, data flow, we see, we see buff, so we have the, we have the, we have the, we have the kernel
machine, the kernel is a message, which, the problem that we have in today's implementation,
that the kernel API copies the bytes inside the kernel as well, right, it has the same copy semantics.
But it's not a given, right, there are copies that can be used, and you can get the IOVect that, you know,
from the actual buffers that you, that we'll receive from the link itself, right.
So it's an implementation limitation today, because my focus was to get the infrastructure going
and then to actually make sure that, you know, the bits and bytes actually do not copy, right.
So you have the kernel received message, and it goes into our data buffer flow,
that's kind of the pre-allocation that we have today already, right. So, in the correct implementation,
we have the correct, we have zero copies, right, and you have this buffer ID, which today
actually points to an actual buffer, actual size, but there is a point to an IOVect of receive pages,
right, again, they have the sizes, but it's not a single buffer, it's an IOVect, as we receive from the
net also, yeah, after the speed. That's the forward path, you, you receive the buffer,
you have this ID, and then you send it, right, but again, you're going to send it on an actual
buffer, so get you send it to a device, and it sent via the kernel, uh, kernel socket, like again,
true zero copies need to be a handlebar, okay. Why use space initiates and and price, and a couple
of excuses, mainly I didn't get to fixing it properly, but you still need that pressure on your
TCP circuits, right, when you have two circuits, and you combine in them, one of the projects that
you go and I will involve a couple of years ago, it's just connecting two TCP circuits,
you'll get to this, you, you will get an improvement in the TCP performance, they just
amagic of it, just look at the KDCP, it's on YouTube, uh, laughter sentty means that,
there is no kind of several bugs that you can handle, get into, uh, and no hot buffer locations,
right, so you pre-all look at the memory, you don't know how to get anything on the fly,
and simply they happen, like, one, two, three, four, five, instead of handling, uh, K solar and
saying, hey, this is the kernel address, now we need to remove the base and kind of the opposite,
it's such a very complicated, but for the initial implementation, it's kind of, the sum of the
problems, uh, kind of resulted in our, uh, in our module that having a prime, uh, the memory.
So, kind of components today, we have the buffer publication, we have the soccer management, we have the
are you in interface to interface between your application, and you can, the kernel sockets,
two, zero copy, it's in the works, you have this user space library that you can create context,
destroy context, allocate buffers, uh, free them, uh, socket, listen, uh, you can be, you know,
sending receiving, a, basically, a socket again, and here is kind of a chunk of, uh, an actual
code, you can get it in, in, uh, on GitHub, like, a, you receive buffer, and then,
what's kind of, uh, it's not a very good chunk of memory, but here, you receive bytes, and now,
you send them with the context that you created, and this is the out socket, and this is the buffer,
right, it's a handle, offset, if you want to send it all, length, and, and some type, right,
and here, you just flush it, it's an IO, you ring, uh, application, and you just sent the,
not the bytes, right, you just sent the metadata, that's all we did, mate, uh, forms expectations,
we're talking about, we're talking about, probably, from previous experience, we're working in
40 gigabytes, 100 gigabytes, again, if you're working with a 10 gigabytes, uh,
you're probably okay with copying as well, but again, it very depends, depending on,
your exact use case, uh, so with traditional, you have two copies, uh, it's there, right,
you copy a lot of bytes, and you have some latency, again, because you're, you're
disrupting the cache and, uh, and wasting cycles on, on copying, you're not efficient, right,
M of zero copy, you don't have actual copying, but you are there inside very critical
paths of your, of your, uh, of your process, managing your cache levels, and it's inefficient.
Zero overhead means that you have none of it, right, you just, we see in handlers and sending
the way. So, why say fuse, why are we having this discussion in, in, in, as, as there's,
is because one of the use cases that we want to reverse is the few splined, right,
so fuse is a, I don't know, how, how many are familiar with it, basically, a use space interface
for your abstract, uh, virtual file system, right, so you have fuse in, uh, fuse kind of driver,
and all the callbacks for a regular file system, operations are delegated back to the,
use space color, right. So, uh, we have the use space client, and we want to
receive the bytes, uh, from the network and keep inside the canal, and then push them back into the
fuse client and back to the user. So, today, if you've client, uh, we'll receive the bytes,
copy them into user space, then copy them back into fuse, and then maybe copy it back, I'm not sure
about it, uh, back to the user, again, right. So, it's free copy, with our solution, uh, the initial
copy is missing, obviously, the path between the, uh, network and the fuse, the couple of ways
to go about it, uh, I'm, I'm, can split between splies and, and maybe see if I, you can be optimized.
But if it's done, basically, we'll have Dr. Arriving, the logic of a fuse client remaining in
user space, and the actual bytes, moving, we are one of the available mechanisms,
into the fuse canal driver, and then to the user, right. So, it's both, uh, send and receive,
just, you know, the other way around. So, basically, aside from fuse providing the bytes to the
user, there are no copies. Um, okay, skip the, uh, so, you have splies, I mean, maybe you
only be pf, I don't know, I was, uh, just think about it. Implementation status, as I mentioned,
most of the things are done, and I need to choose your copy, then we'll talk about fuse integration,
some performance benchmark, our demo support, I know, just, you know, vibing.
What else do we need? So, uh, library integration, standalone demo is available right now.
Again, you need to see if what's ups, ups, you know, up there is a compiling.
Then we will need to integrate with the fuse, uh, and use capers for, you know,
such a large operation, right. What else we can do? We have additional things in, in, in, um,
as they are, like, or are self-specifically Ganesha, right. We've Ganesha is a user space process
that's, on one hand, is a self-clined, and on the other is NFS exporter, right.
But it doesn't actually need to touch any of the bytes that it's, uh, you know, servicing.
So having Ganesha use this kind of solution is ideal. It will just collect, identify as from the
canal, keep the buffers wherever they may be, depending on the, catching, uh, algorithm or
catching policy that Ganesha may have at hand at the moment, and then service it as many times as
it needs to, right. So Ganesha is the ideal on the client, but it's kind of, you know,
down the road because there's, you know, many complex things. Some other, there are non-file
system solutions, uh, CDMs, right. So when you have a file stream, like a movie stream, right,
you just receive it, and then whenever a client that's close to you needs to see whatever,
you know, whatever, Keden, uh, Denson Keden, you want to see, you know, it's a service from the canal.
Uh, some of Nankesh D, uh, read this again for the same, uh, use case. You receive whatever,
you want to service, but you keep it inside the kelom memory, you keep the handler in all the
logic that you had remains unmodified. And that's kind of the, uh, general proxy pattern.
Uh, so let's talk about it. The key takeaways, you have zero overhead, it's better than zero
copy, right. None of the usual things that are that we have today with zero copy solutions are here.
So it's, it's, it's zero, right. So zero overhead, it's a handlebase architecture. The reason why we
chose this, it's very unintrusive, right. So, uh, it's a canal module that can be built outside of
three, right. It can be just our own implementation. So I don't really need to talk to a worry
about upstream things, the thing, but you know, it's in the, in the plan, uh, proxy workloads benefit,
like, or everything that I mentioned. And so any feedback, any little feedback, because again,
this is working progress is welcome. Uh, the 50, 70 per the person production is, if you're going
up to a 100, there will be Nick. Yeah, you'll be spending about 70 per, 70% of your, uh, CPU,
just moving bikes. If you go about, you know, 100, there will be links and end up. So I, you know,
going forward, and again, 100, there will be links are here for, you know, being here for
since about 10 years. So, it's now, uh, questions. Thank you.
First of all, first of all, um, if you put your reach out there, it will cost somebody's a symbol of
one, um, in the second question, I have, uh, your age and age also, so you don't have to set
under score in there. That's true. I mean, how is this set specific? Okay. So, uh, it's good
question. So it's a double question. Yes, it's both going to show it's both sound, but it's just an example.
You can use anything else as well. Why does it have Seth? Because I'm bad with names, and we can
change it. There's no, no, no, no, no, no, no, no, no, Seth, uh, yeah, got. What's the difference
between Gladys- bekleres from Ioling? I'm certain. Oh, yes.
For all that, Scott? I also loved assuming the other, ooh, yes.
You can few multiple operations on the master by the whole set.
Okay, I'm not sure can repeat it to the let's take it out later
chemistry couple
So the question is if we might still want redaxes or in this case full redaxes to
Well, I'm the five-star on it's usually done by the Nick today
So what you get is what you get you don't have additional validations on the CPU
Right
We do have a
Peak logic inside of you can get because you receive a stream of bytes that's the CCP
You still need to understand how to divide it logically. So you do have peak and
Pick means yeah, we copy some of the bytes and you know it depends on you
What does you know how many bytes you want?
So from safety for you know for the quality it remains like more a lot of the
Making sure that you know no no bits were flipped is done on the hardware level right both in the receiver and the same side
Don't use the geophile. I think the F5 sides, but I'll end that you'll be good
Okay
So the question is about our day may are they may is is nice a the problem of our day may is twofold one is that you need
Dedicate hardware and you don't have it usually, right even for for rocky
Variants or you know it's over our day may a most people won't have it, right?
And the other is it's kind of a competitive solution in a way like other day may doesn't need this and
The the only benefit for our day may would actually be any application. Actually does need to to read because it
writes into your user space
Memory and then you can access it
It's not a common API. I don't want to talk about I don't know what I implement I be verbs inside of this
It's distinct it services a very specific
Neville proxy
Zero copy solution right for if you're not an act of proxy if you're not proxy in some stream for one side to another
You can do you know
Something else
Okay, if we a time
Okay, if I do the space process talking to use
I want to ship that without if you cover whatever to okay
No, but again, I'm not sure so you use talking at unique circuits and you want to do
zero copy with fuse from user space like
So again fuse
It you know and writing now the user space
File not net of it not a net profile system
Yeah, that's not a net of that's a net of works
All right
We have one more question
Yeah, the user space register the buffer yes, so I am using just the interface to communicate with the kernel and then
The and the and the user there are multiple ways about it. I even just seem the most suitable for it
It's for the interface for the communication or for the data transfer
Thank you folks
You