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
1 answer

Zero Copy byte[] or ByteBuffer with HttpServletResponse

When using Google's FlatBuffer, the type that ends up being used is a ByteBuffer (which can just wrap a byte[]). I am using this with an HttpServletResponse. The problem becomes the Servlets PrintWriter does not offer byte[] or ByteBuffer writing.…
ThePrimeagen
  • 4,462
  • 4
  • 31
  • 44
0
votes
1 answer

Sending the same tcp message to multiple destinations/hosts in a single context switch

I need to send/fan-out the same message to a list of hosts through tcpip sockets efficiently. The logic would require looping through each socket to write the message out. If this logic runs in the linux user mode, the underlying OS will call the…
Thang
  • 31
  • 5
0
votes
1 answer

Reactive Extension, wrap third party API event - zero copy?

I have a third party API that I do not have the source to. I instantiate a callback to an event like this: using namespace API; // This is where APIClient lives namespace TestApiClientUI { public partial class Form1 : Form { …
Ivan
  • 7,448
  • 14
  • 69
  • 134
0
votes
1 answer

Implementing "move" thread semantics

I want to write a function to be called like this: send("message","address"); Where some other thread that is doing let k = recv("address"); println!("{}",k); sees message. In particular, the message may be large, and so I'd like "move" or…
Drew
  • 8,675
  • 6
  • 43
  • 41
0
votes
1 answer

How to send packet in both FileRegion and ChannelBuffer type together

public class Response{ public int packetLength; public int cmd; public int seqId; public FileRegion fileRegion; //file content public String filename; public int begin; public int end; public String otherExtra; public void…
Liuda
  • 1
  • 2
0
votes
1 answer

Channels.newChanne() will help to achieve actual ZeroCopy

I have some doubt regarding using Channels.newChannel(OutputStream/InputStream) in zeroCopy operation. Will it serve as zeroCopy. I have some restriction like have to send 1st header part(file and user related information) then file content. For…
Upendra
  • 87
  • 1
  • 10
0
votes
0 answers

How to inplement Zero Copy in Application where Client and server Using some Protocol for read/write file

By using java I have to read/write files with addition of header information. Like when a client wants to write one file, it will first send header information(length, fileinfo...) with DataOutputStream and then actual file content. My file content…
Upendra
  • 87
  • 1
  • 10
0
votes
1 answer

transmit file function in visual studio 2010

I have written a function to use TransmitFile API in recv function,the program is as below: #include "stdafx.h" #include "tcp.h" #include #include bool CTcpClient::Start() { WSADATA wsaData; // Initialize…
Satya Kumar
  • 179
  • 1
  • 4
  • 19
0
votes
0 answers

Zero copy in Qt client program

I am trying to implement zero copy approach in my client progrm where I will recieve a large amount of data from server.Here is my client program: //Client.h #ifndef CLIENT_H #define CLIENT_H #include #include…
Satya Kumar
  • 179
  • 1
  • 4
  • 19
0
votes
1 answer

Why OpenOnload extensions API for zero-copy doesn't have anything for UDP send or TCP receive?

According the OpenOnload Extensions API documentation zero-copy APIs don't include UDP send and TCP receive scenario. Why?
Ming
  • 365
  • 2
  • 12
1 2 3 4 5 6
7