其他操作系统是否实现Linux系统调用接头? [英] Do other operating systems implement the Linux system call splice?

查看:101
本文介绍了其他操作系统是否实现Linux系统调用接头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我正在开发的应用程序中,我在Linux上使用 splice 套接字到套接字的数据传输.

In an application I am developing I use splice on Linux for socket-to-socket data transfer.

  1. 其他操作系统(尤其是至少Windows,OS X和FreeBSD)是否实现splice或等效解决方案?
  2. 是否可以在Windows中使用sendfile¹+ memmap¹模仿套接字到套接字的数据splice?
  1. Do other operating systems (specifically at least Windows, OS X and FreeBSD) implement splice or an equivalent solution?
  2. Is it possible to imitate socket-to-socket data spliceing on Windows with sendfile¹ + memmap¹?


¹这两种名称在Windows上都以不同的名称存在,我不记得了.


¹ Both exist on Windows under different names which I do not remember.

更新

与Linux上的用户空间缓冲区相比,您可以看到splice的性能改进.

You can see the performance improvements of splice vs user space buffers on Linux.

  • DFDRFMFMR是我在不同隧道模式下的应用程序,NX是NGINX Web服务器
  • -p+t使用Linux系统调用splice
  • +p-t使用带有用户空间缓冲区的可移植实现
  • +p+t使用带有用户空间缓冲区和多个OS线程的可移植实现
  • 条形图表示每秒 gigaBYTE 秒的吞吐量
  • 1个1 GB(1048576000字节)文件被4个并发客户端请求4次
  • DF, DR, F, MF, MR are my application in its different tunneling modes, NX is NGINX web server
  • -p+t uses the Linux system call splice
  • +p-t uses a portable implementation with user space buffers
  • +p+t uses a portable implementation with user space buffers and multiple OS threads
  • bars represent throughput in gigaBYTE s per second
  • a single 1 gigabyte (1048576000 bytes) file was requsted 4 times by 4 concurrent clients

推荐答案

OpenBSD具有sosplicesomove:

OpenBSD has sosplice and somove: http://www.openbsd.org/cgi-bin/man.cgi?query=sosplice

这篇关于其他操作系统是否实现Linux系统调用接头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆