Category: Performance

  • io_uring By Example: An Article Series

    io_uring is a clever new, high-performance interface for asynchronous I/O for Linux without the drawbacks of the aio set of APIs. In this 3-part article series, we look at how to use io_uring to get the most common programming tasks done under Linux. We write a series of programs of increasing complexity to slowly but…

  • io_uring By Example: Part 3 – A Web Server with io_uring

    This article is a part of a series on io_uring Series introduction Part 1: Introduction to io_uring. In this article we create cat_uring based on the raw io_uring interface and cat_liburing, built on the higher level liburing. Part 2: Queuing multiple operations: We develop a file copying program, cp_liburing leveraging multiple requests with io_uring. Part…

  • io_uring By Example: Part 2 – Queuing multiple requests

    This article is a part of a series on io_uring Series introduction Part 1: Introduction to io_uring. In this article we create cat_uring based on the raw io_uring interface and cat_liburing, built on the higher level liburing. Part 2: This article. Part 3: A web server written using io_uring. In part 1, we saw how…

  • io_uring by example: Part 1 – Introduction

    This article is a part of a series on io_uring Series introduction Part 1: This article. Part 2: Queuing multiple operations: We develop a file copying program, cp_liburing leveraging multiple requests with io_uring. Part 3: A web server written using io_uring. Introduction Come to think about it, I/O, along with compute are the only two…

  • Linux Applications Performance: Part VII: epoll Servers

    This chapter is part of a series of articles on Linux application performance. If you came here without reading the poll()-based implementation description All the explanation of how exactly we move from a process or thread-based model to an event based model is there in the poll()-based article. Without going through it, this article might…

  • Linux Applications Performance: Part IV: Threaded Servers

    This chapter is part of a series of articles on Linux application performance. Threads were all the rage in the 90s. They allowed the cool guys to give jaw-dropping demos to their friends and colleagues. Like so many cool things from the 90s, today, it is yet another tool in the arsenal for any programmer.…

  • Linux Applications Performance: Part V: Pre-threaded Servers

    This chapter is part of a series of articles on Linux application performance. The design discussed in this article is more popularly known as “thread pool”. Essentially, there is a pre-created pool of threads that are ready to serve any incoming requests. This is comparable to the pre-forked server design. Whereas there was a process…

  • Linux Applications Performance: Part VI: Polling Servers

    This chapter is part of a series of articles on Linux application performance. When things happen sequentially, we get them. All our flowcharts, algorithms or workflows are sequential in nature. It’s easy for our brains to understand sequential happenings. Moving to a multi-process or a threaded model is also a simple extension of that model.…

  • Linux Applications Performance: Part III: Preforked Servers

    This chapter is part of a series of articles on Linux application performance. While the iterative server has trouble serving clients in parallel, the forking server incurs a lot of overhead forking a child process every time a client request is received. We saw from the performance numbers that in our test setup, it has…

  • Linux Applications Performance: Part II: Forking Servers

    This chapter is part of a series of articles on Linux application performance. In Part I: Iterative servers, we took a look at a server which deals with one client request at a time. This server called accept() whenever it was done serving one client so that it could accept more client connections and process…