The coming generation of Internet-of-Things (IoT) applications will process massive amounts of incoming data while supporting data mining and online learning. In cases with demanding real-time requirements, such systems behave as smart memories: high-bandwidth services that capture sensor input, processes it using machine-learning tools, replicate and store interesting data (discarding uninteresting content), update knowledge models, and trigger urgently-needed responses.
Derecho is a high-throughput library for building smart memories and similar services. At its core Derecho implements atomic multicast and state machine replication. Derechos replicated
A plethora of mutex lock algorithms have been designed to mitigate performance bottlenecks. Unfortunately, there is currently no broad study of the behavior of lock algorithms on realistic applications that consider different performance metrics (energy efficiency and tail latency in addition to throughput). In this paper, we perform an analysis of synchronization to provide application developers with enough information to design fast, scalable and energy-efficient synchronization. First, we study the performance of 28 lock algorithms, on 40 applications, on four multicore machines, considering throughput, energy efficiency and tail latency. Second, we describe nine lock performance bottlenecks, and propose six guidelines helping developers with their choice of a lock algorithm. From our analysis, we make, several observations: (i) applications stress the full locking API (e.g., trylocks), (ii) the memory footprint of a lock can affect performance, (iii) the interaction between locks and scheduling is an application performance factor, and (iv) lock tail latencies may or may not affect application tail latency. These findings highlight that locking involves more considerations than the simple lock unlock interface and call for further research on designing low-memory footprint adaptive locks that fully and efficiently support the full lock interface, and consider all performance metrics.