📜 ⬆️ ⬇️

Modern I / O devices are faster than processors. Article review


I want to talk about the article "I / O Is Faster Than the CPU - Let's Partition Resources
and Eliminate (Most) OS Abstractions " , published on the personal page of one of the developers of ScyllaDB, Pekka Enberg. I learned about it from the video .


The authors were supposed to speak at the HOTOS17 (Hot Topics in Operating Systems) workshop on May 12-15, 2019, on this article. As I understand it, they are discussing developments in the early stages of their life.


My article is of a news character with the aim of arousing inquiring minds to think about this topic and to reflect in the comments.


General essence


Input-output on servers with fast programmable network cards and non-volatile memory is approaching the speed of volatile RAM, and the speed of a single processor core remains in place. Applications cannot take advantage of modern hardware because forced to use interfaces built on abstractions involving slow I / O systems.


The authors offer their own OS structure, which is called parakernel , it eliminates most of the OS abstractions and provides an interface for applications so that they can use the full potential of the equipment. Parakernel facilitates application-level concurrency by securely sharing resources and multiplexing non-shared resources.


The architecture of modern operating systems was invented when the I / O speed was much lower, and applications were waiting for I / O operations. Nowadays, I / O devices can easily saturate the processor.


According to the authors, modern network stacks do too much work on the packet. In addition, the OS typically implements the POSIX socket API, which has the high overhead of context switching and processor cache pollution.


Hardware prerequisites


A modern 40Gbps network card can receive a packet comparable to the cache line every 5 ns, and the LLC (last level cache) access delay for processors is approximately 15 ns.


For example, Linux developed the POSIX AIO interface, which should provide a simple and efficient asynchronous I / O interface. Implementation, support and use of such an interface while maintaining POSIX semantics turned out to be very difficult and were abandoned in favor of the new io_uring .


What solution is proposed


The new structure of the OS, which the authors call parakernel , is designed to simplify the parallelization of tasks. Applications are allocated resources and they have full control over them, resources that cannot be divided are multiplexed by the core.


Sharing resources in multi-core systems requires synchronization between the processor cores, which prevents concurrency at the application level. This obstacle can be reduced by dividing the resources between the processor cores.


Results


Some operating system abstractions limit I / O performance. The authors represent the OS structure that shares shared resources and multiplexes non-shared resources. Parakernel simplifies application-level concurrency, and complements the design flow to the core .


The protokernel parakernel is written in Rust and is currently under development. In the article I did not see the name of the operating system, but I found another material from one of the authors of the Manticore Operating System and conclude that this is the repository of this development.


What in the rest of the world


As it turns out, processor manufacturers are not sleeping and are also trying to solve the problem of a slow interlayer between their products and consumers. So many are not satisfied with the bottleneck of productivity in the form of the operating system kernel.
Interesting innovations from Intel, more about which can be found in this article . I will give an excerpt from it:


  • Intel Volume Management Device (Intel VMD) - allows you to work with NVM Express drives directly, "giving away" the device immediately to the storage system. As a result, full SSD hot swapping, status indication and use of Intel VROC technology became possible.
  • Intel Virtual RAID on CPU (Intel VROC). It allows you to create RAID from NVMe drives using a processor, with it you can opt out of software solutions or additional adapters to create arrays from high-speed PCIe SSDs.
  • Internet Wide-Area RDMA Protocol (iWARP). The RDMA extension is now supported by Intel's integrated X722 network adapters, because the processor supports four 10-gigabit (or gigabit) Ethernet ports. Let me remind you, RDMA accesses data over the network directly from memory, bypassing the kernel and operating system.

It is always very interesting to learn about new concepts in already established systems.


Please write about the noticed errors and necessary additions.


UPD : Community changes to this article.


Thanks for the help:



A line of advertising for the podcast " Zinc Prod " in which we discuss this article as the topic.


')

Source: https://habr.com/ru/post/451966/


All Articles