Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do other operating systems implement the Linux system call splice?

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

  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¹?

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


Update

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

go

  • 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
like image 943
Cetin Sert Avatar asked Nov 13 '22 23:11

Cetin Sert


1 Answers

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

like image 139
Cetin Sert Avatar answered Dec 06 '22 20:12

Cetin Sert