Main Page

From MemCP
Revision as of 13:39, 22 September 2025 by Carli (talk | contribs)
Jump to navigation Jump to search

MemCP – A Modern In-Memory Columnar Database

MemCP is a high-performance, in-memory, column-oriented database designed for modern workloads. It provides a lightweight, developer-friendly alternative to traditional relational databases such as MySQL, with a focus on speed, compression, and direct API integration.


Key Features

  • High Performance: NUMA-aware, parallelized query execution optimized for multicore CPUs, large caches, and NVMe SSDs. Handles both OLTP and OLAP workloads efficiently.
  • Columnar Storage: Data is stored by column for improved compression, reduced memory footprint, and faster analytical queries.
  • In-Memory Operation: Designed to keep data in memory, with configurable persistence backends for durability.
  • Built-in APIs: Exposes RESTful endpoints directly from the database, reducing middleware overhead.
  • Compression: Multiple strategies (bit-packing, dictionary encoding, sequence compression) reduce storage by up to 80% compared to MySQL/MariaDB.
  • Simple Deployment: Start with a single docker run or pm2 start command. Lightweight footprint (~10MB).
  • Extensible: Written in Go, with pluggable storage backends and custom frontend support (SQL, RDF, REST).

Why MemCP?

Traditional relational databases were designed decades ago, optimized for spinning disks and single-core CPUs. MemCP rethinks the core design for today’s hardware and workloads:

  • Real-time dashboards and analytics
  • Data-heavy SaaS platforms
  • Embedded systems with limited resources
  • High-throughput OLTP/OLAP hybrids

Quick Start

Clone and build MemCP from source:

git clone https://github.com/launix-de/memcp
cd memcp
go get
make
pm2 start ./memcp ./data/

Connect with MySQL tooling:

mysql -u root -p -P 3307
Enter password: admin

MemCP vs. MySQL

Feature MySQL MemCP
Storage Model Row-based Column-based (compressed)
Performance Good NUMA-optimized, in-memory
In-Memory Capable Limited Yes (default)
REST API Integration External Built-in
Installation Footprint ~150MB+ ~10MB
Open Source

Architecture Overview

  • Tables, Schemas, Columns: Familiar SQL-style structures with a columnar physical layout.
  • Transaction Model: Supports both OLTP and OLAP semantics with delta + main storage.
  • Persistence: Configurable storage backends (filesystem, S3, Ceph).
  • Frontends: Multiple query interfaces:
 - SQL frontend (MySQL wire protocol + SQL over REST)  
 - RDF/graph query engine  
 - Custom APIs via in-database web apps  

Documentation


Further Reading

Additional blog posts on design decisions, compression techniques, and performance optimization are available on the Launix blog.


Community

MemCP is an open-source project maintained by developers for developers. Contributions are welcome — whether in the form of bug reports, feature requests, or pull requests.

See: Contributing