data-loading

Optimize database data loading with memory mapping, prefetching, and NUMA-aware allocation.

71|8|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/SolidLao/GenDB --skill data-loading-solidlao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-loading
Source: https://github.com/SolidLao/GenDB/tree/main/.claude/skills/data-loading
Command: npx skills add https://github.com/SolidLao/GenDB --skill data-loading-solidlao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the critical performance bottleneck of data loading and I/O operations, particularly during cold starts, by implementing advanced memory mapping and prefetching strategies.

Core Features & Use Cases

  • Optimized Memory Mapping: Utilizes mmap with MAP_POPULATE for efficient zero-copy column access.
  • Intelligent Prefetching: Employs posix_fadvise and zone-map-guided madvise to selectively load only necessary data blocks.
  • NUMA-Aware Allocation: Distributes large memory allocations across NUMA nodes to avoid performance cliffs.
  • Cold vs. Hot Start Optimization: Provides strategies to minimize I/O on cold starts while maintaining performance on hot starts.
  • Use Case: When querying large datasets, this skill ensures that only the relevant columns and data blocks are read from disk, drastically reducing query latency.

Quick Start

Use the data-loading skill to optimize the memory mapping and prefetching for a column-oriented dataset.

Frequently Asked Questions about data-loading

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize data loading for database cold starts?

To optimize data loading for database cold starts, use memory mapping with MAP_POPULATE for zero-copy access and apply posix_fadvise to prefetch only necessary data blocks, minimizing initial disk I/O.

How does mmap improve column access performance for large datasets?

Memory mapping (mmap) improves column access performance by enabling zero-copy reads directly from disk to memory. Using MAP_POPULATE pre-faults pages, reducing latency during large dataset queries.

What is NUMA-aware allocation and when do I need it for data loading?

NUMA-aware allocation distributes large memory allocations across NUMA nodes to avoid performance cliffs. You need it for high-performance data access on multi-socket systems to maximize memory utilization and query speed.

How do I selectively load data blocks using zone maps?

You can selectively load data blocks using zone maps by employing madvise to guide prefetching. This technique reads only relevant columns and blocks from disk, drastically reducing query latency on large datasets.

What is the best way to reduce disk I/O during database queries?

The best way to reduce disk I/O during database queries is combining mmap for zero-copy column access with zone-map-guided madvise. This parallel prefetching strategy ensures only necessary data blocks are read.

Why does query latency spike on cold starts and how can prefetching help?

Query latency spikes on cold starts because data must be read from disk into memory. Prefetching with posix_fadvise anticipates these reads, loading necessary blocks in advance to minimize I/O bottlenecks and improve performance.