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
0
votes
0 answers

Is zero-copy only supported by Kafka on linux?

I am currently studying Kafka and it says that one of its main features is that it uses zero-copy to improve performance in message transmission and reception between brokers and clients. I understand that zero-copy is only provided in Linux, but…
PositiveM
  • 63
  • 7
0
votes
0 answers

Out-of-band (zero-copy) pickling of a Pandas DataFrame with mixed column types

I'm attempting to achieve zero-copy sharing of a Pandas DataFrame between processes launched from seperate console sessions. Please consider the following two Python files: producer.py: import pandas as pd import numpy as np import pickle df =…
FunkyOne
  • 51
  • 1
  • 5
0
votes
1 answer

How to implement zero-copy form gRPC c++

I want to write a gRPC server(c++) which serves as a FTP server in some case. In detail, client requests a file by its name, while server returns the file content if it exists. In traditional socket programming, I can implement zero-copy utilizing…
0
votes
0 answers

How to pass data from request to response without copying in actix_web

I have a User structure that is deserialized from the request body. I want to fill the data of the User structure (field name) according to the data received from the database and return the response. Without copying, borrow the username from the…
TupleCats
  • 351
  • 3
  • 15
0
votes
1 answer

What can cause returning SO_EE_CODE_ZEROCOPY_COPIED when sending udp messages with MSG_ZEROCOPY?

Enviroment Linux version: Linux 5.4.0-4-amd64 Debian 5.4.19-1 x86_64 GNU/Linux NIC scatter-gather: scatter-gather: on tx-scatter-gather: on tx-scatter-gather-fraglist: off [fixed] Output The sock_extended_err code is set to…
HypoGump
  • 51
  • 1
  • 10
0
votes
1 answer

can you create a np.complex128 1d array from two np.float 1d arrays without copy?

The Setup : I have two arrays from shared memory reals and imags : #/usr/bin/env python2 reals = multiprocessing.RawArray('d', 10000000) imags = multiprocessing.RawArray('d', 10000000) then I make them numpy-arrays, named reals2 and imags2,…
Trevor Boyd Smith
  • 18,164
  • 32
  • 127
  • 177
0
votes
1 answer

splice(2) returns "Invalid argument" when reading from ftrace raw files

I wanted to try splice syscall, which trace-cmd uses to zero copy raw files of off ftrace. Here is the partial list of ftrace raw files splice fails to…
p3t3
  • 95
  • 8
0
votes
1 answer

TCP File Transfer - Kernel copy mechanisms

I am wondering, if the speed of copy processes between user and kernel space, and in general within the whole tcp send/receive process, is dependent on the type of file (.txt, .mp4). I mean not the file size, but the "structure" of the bytes or…
0
votes
0 answers

Reading data from a socket directly into a Memory Mapped File

I'm trying to create a .NET Core application and am getting a little stuck on IPC. I have data coming in (let's say, from a socket, or a file, some sort of streaming interface), via executable 1. Now, I want this data to be read by executable 2. So,…
Rainmaker
  • 173
  • 3
  • 13
0
votes
0 answers

Remote file transfer using java nio

I am trying to use JAVA NIO to transfer a file from host A to client B without having to download the file locally and then giving the client B a link to download the file. I am running a spark Apache framework and using maven project. I mapped the…
0
votes
0 answers

Are FlatBuffers beneficial without Zero Copy?

Can FlatBuffers still prove beneficial in terms of performance and memory efficiency when we copy the source stream (e.g. from a streambuf in boost.asio) to a user space application allocated memory? Or does it perform the best with Zero Copy…
Kamesh Rao Yeduvakula
  • 1,215
  • 2
  • 15
  • 27
0
votes
1 answer

Netty Zero-copy in windows

1)Is Netty's zero-copy work on windows 7? 2)Does anyone have examples of Netty's zero-copy usage for client-server? 3) I have also found an example of zero-copy using FileChannel, what's the defference between netty realization and…
user304371
  • 21
  • 2
0
votes
1 answer

FileChannel.transferTo (supposedly zero-copy) not giving any performance gain

I am working on a REST API that has an endpoint to download a file that could be > 2 GB in size. I have read that Java's FileChannel.transferTo(...) will use zero-copy if the OS supports it. My server is running on localhost during development on my…
Ajoy Bhatia
  • 603
  • 6
  • 30
0
votes
1 answer

Netty 4 HttpContentCompressor file region

I'm attempting to send a file to the response and support encoding. The code is mostly copied from one of the examples in the Netty github. ChannelFuture flushFuture; if (context.pipeline().get(SslHandler.class) == null) { …
James Kleeh
  • 12,094
  • 5
  • 34
  • 61
0
votes
0 answers

Is it possible to reuse sk_buff?

On every received ethernet frame driver allocates new sk_buff buffer which is innefficient. Is it possible to allocate a bunch of sk_buffs during initialization and reuse those sk_buffs after high levels stops using it?
user3414682
  • 107
  • 1
  • 6