All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Memory Maps (mmap) Achieve 25x Faster File Access in Go Applications

By

ingve

7mo ago· 2 min readenInsight

Summary

The article discusses how memory maps (mmap) can deliver significantly faster file access in Go applications, with benchmarks showing up to 25x performance improvements over traditional file reading methods. It explains the technical implementation differences between mmap (memory-mapped files) and ReaderAt (pread) approaches, highlighting how mmap reduces latency by mapping files directly into memory. The author shares practical experience from developing an HTTP-backed filesystem for AI Storage Acceleration solutions, demonstrating real-world applications in high-performance computing environments.

Key quotes

· 3 pulled
To show what kind of performance you can get using memory maps, I've written a little Go library that allows you to read from a file using a memory map or a ReaderAt.
ReaderAt will do a pread(), which is a seek/read combo, while mmap will just read from the memory map.
The last couple of weeks I've been working on an HTTP-backed filesystem. This is part of our AI Storage Acceleration solution, geared towards high performance computing environments.
Snippet from the RSS feed
Learn how memory maps (mmap) accelerate file I/O, reduce latency, and improve app performance in Unix and Go with real-world benchmarks.

You might also wanna read