Ariadne Conll, creator of the Audacious musical player, initiator of the development of the IRCV3 protocol and the leader of the security team Alpine Linux, conducted research how much it is possible to optimize the CAT utility, which output into the standard output stream of one go several files. To improve Cat performance in Linux, two options for optimizations based on the use of system calls sendfile “> > and space for direct copying between file descriptors at the nucleus level without switching the context To the user space.
The basic implementation using the traditional READ and WRITE calls leading to the context of the context when copying the 4GB of the file from TMPFS showed the performance of 3.6 GB/S. The option based on Sendfile made it possible to increase performance to 6.4 GB/S, and the option based on Splice – up to 11.6 GB/S, i.e. turned out to be faster than the original option more than 3 times.