Questions tagged [zero-copy]

"Zero-copy" describes computer operations in which the CPU does not perform the task of copying data from one memory area to another.

Zero-copy describes computer operations in which the CPU does not perform the task of copying data from one memory area to another. This technique is used in various software elements (e.g.device drivers, file systems, and network protocol stacks) to increase the performance and more efficiently utilize system resources.

Network applications that use zero copy request that the kernel copy the data directly from the disk file to the socket, without going through the application. Zero copy greatly improves application performance and reduces the number of context switches between kernel and user mode.

References:

100 questions
1
vote
1 answer

Is it possible to use zero-copy when copying packets to TAP device?

Recently, I was reading vhost in linux kernel. And I find a pdf that said vhost zero-copy data to TAP device. I tried to trace the source code but find nothing about zero-copy. Is it possible to use zero-copy when copying packets to TAP device? How?
4va1anch3
  • 427
  • 1
  • 4
  • 13
1
vote
0 answers

Why zmq_msg_init_data() is not freeing my allocated memory?

ZeroMQ is offering a zero-copy technique, where networking copying data is avoided as much as possible. However it doesn't seem to work (as tested with ZeroMQ v4.1.5). This is the server code: void CustomCleanup(void *data, void *hint) { cout <<…
charis
  • 429
  • 6
  • 16
1
vote
0 answers

Moving files between remote sites - Avoid local buffering

I need to move two files (from remote host A to remote host B) using a Java application in a third host (my local host). I was wondering if there is any chance of getting the data transferred directly from host A to host B without the data being…
Aitor
  • 195
  • 1
  • 11
1
vote
0 answers

Why isn't CompositeByteBuf used for ByteToMessageDecoder?

In the ByteToMessage decoder (https://github.com/netty/netty/blob/master/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java), which ReplayingDecoder derives from, the cumulation ByteBuf (used to accumulate data until enough has…
1
vote
0 answers

netfilter - PRErouting zero copy?

Context Debian 64 bits custom kernels 3.14-3.16 Question After reading a lot about port forwarding, I would like to know if nftable/iptables does zero-copy with splice(or something else) to route a packet to its destination in case the packet only…
Larry
  • 1,735
  • 1
  • 18
  • 46
1
vote
0 answers

strange behaviour using mmap

I'm using Angtsrom embedded linux kernel v.2.6.37, based on Technexion distribution. DM3730 SoC, TDM3730 module, custom baseboard. CodeSourcery toolchain v. 2010-09.50 Here is dataflow in my system: https://i.stack.imgur.com/kPhKw.png FPGA generates…
Konstantin Utkin
  • 478
  • 1
  • 5
  • 16
1
vote
1 answer

Where are mapped device memory to, in virtual addressing, when using Intel I/OAT?

When I use Intel I/OAT for DMA zero-copy/zero-cycles(without CPU) transfer through async_memcpy, then where are mapped device memory to, in virtual addressing: to the kernel-buffer(kernel space) or to the user-buffer(user space)? And does it make…
Alex
  • 12,578
  • 15
  • 99
  • 195
1
vote
1 answer

Assign string to zmq::message_t without copying

I need to do some high performance c++ stuff and that is why I need to avoid copying data whenever possible. Therefore I want to directly assign a string buffer to a zmq::message_t object without copying it. But there seems to be some deallocation…
moo
  • 486
  • 8
  • 22
1
vote
3 answers

zero copy in Qt application in C++

here is the program that I wrote to implement zero copy in a Qt application but getting some errors written below: //client.h #ifndef CLIENT1_H #define CLIENT1_H #include #include #include #include…
Satya Kumar
  • 179
  • 1
  • 4
  • 19
1
vote
1 answer

how to zero copy in a Qt C++ programme?

I have to implement zero copy method in a program in Qt C++,I read about it and got transferto() method.as described below: public void transferTo(long position, long count, WritableByteChannel target); but i can't understand how it works.It is…
Satya Kumar
  • 179
  • 1
  • 4
  • 19
1
vote
2 answers

django (or wsgi) chain stdout from subprocess

I am writing a webservice in Django to handle image/video streams, but it's mostly done in an external program. For instance: client requests for /1.jpg?size=300x200 python code parse 300x200 in django (or other WSGI app) python calls convert (part…
est
  • 11,429
  • 14
  • 70
  • 118
1
vote
1 answer

Cuda zero-copy performance

Does anyone have experience with analyzing the performance of CUDA applications utilizing the zero-copy (reference here: Default Pinned Memory Vs Zero-Copy Memory) memory model? I have a kernel that uses the zero-copy feature and with NVVP I see the…
user926914
  • 193
  • 1
  • 15
1
vote
1 answer

Vectored Referencing buffer implementation

I was reading code from one of the projects from github. I came across something called a Vectored Referencing buffer implementation. Can have someone come across this ? What are the practical applications of this. I did a quick google search and…
KodeWarrior
  • 3,538
  • 3
  • 26
  • 40
1
vote
2 answers

Socket questions

Had a few socket questions, and could not find a definite yes or no, so apologies in advance if it is a repost:) Platform is Linux 2.6.30, C++ app. Still very new to networking, coming up to speed. Is the socket API thread safe? For example, if I…
0
votes
0 answers

Looking for a map structure, shareable between processes and language

I'm looking for an in-memory binary format for a map structure (key-value store) with quick access time. My goal is to: Store this binary format as a file. Be able to retrieve it and with zero-copy, using mmap Be able to search it, with speed…
Damien
  • 1,944
  • 2
  • 18
  • 21