Making the LinkedIn experimentation engine 20x faster

LinkedIn Engineering Team
16 min readadvanced
--
View Original

Overview

This article discusses the significant improvements made to LinkedIn's experimentation engine, known as the Lix Engine, which has been optimized to be 20 times faster. Key enhancements include a complete rewrite in Java, improved memory management, and the introduction of a domain-specific language (DSL) for experimentation.

What You'll Learn

1

How to optimize an experimentation engine for performance

2

Why using a domain-specific language can enhance flexibility in experimentation

3

How to implement effective memory management in Java applications

Prerequisites & Requirements

  • Understanding of A/B testing and experimentation concepts
  • Familiarity with Java programming language

Key Questions Answered

What were the main performance issues with the original Lix Engine?
The original Lix Engine, written in Clojure, faced issues like weak typing, memory inefficiencies, and high garbage collection pauses. These problems resulted in slow execution speeds and made it difficult to maintain and develop due to a lack of proficient Clojure developers.
How did the new Lix Engine improve performance?
The new Lix Engine achieved a 20x improvement in sequential evaluation speed and a 14.7x improvement in concurrent evaluation speed. It also reduced memory footprint by 10.2 times and eliminated garbage collection hiccups exceeding 50ms.
What is the purpose of the Lix DSL in the new engine?
The Lix DSL allows for flexible and deterministic experimentation by enabling randomized population splitting and segmentation. This means that the same experiment will consistently yield the same treatment for a user, enhancing reliability in A/B testing.

Key Statistics & Figures

Sequential evaluation speed improvement
20x
Achieved after the revamp of the Lix Engine
Concurrent evaluation speed improvement
14.7x
Result of optimizations made to the Lix Engine
Memory footprint reduction
10.2x
Significant improvement in memory management after rewriting the engine

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

Key Actionable Insights

1
Implementing a domain-specific language (DSL) for experimentation can significantly enhance flexibility and speed in A/B testing processes.
By using a DSL, teams can decouple experimentation from code releases, allowing for faster iterations and more controlled testing environments.
2
Optimizing memory management in Java applications can lead to substantial performance improvements.
The Lix Engine's rewrite in Java focused on reducing memory overhead and improving garbage collection, which can be applied to other Java applications to enhance their performance.
3
Regularly revisiting and rewriting legacy systems can yield significant performance gains and reduce technical debt.
The Lix Engine's complete overhaul addressed numerous inefficiencies, demonstrating the importance of maintaining modern codebases.

Common Pitfalls

1
Failing to address legacy system inefficiencies can lead to significant performance bottlenecks.
Many organizations continue to use outdated technologies without considering the benefits of modern alternatives, which can hinder overall productivity and system performance.
2
Neglecting memory management can result in high garbage collection pauses and slow application performance.
Improper memory management often leads to increased latency and can severely affect user experience, especially in high-load environments.

Related Concepts

A/B Testing
Experimentation Platforms
Performance Optimization Techniques