Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS_USE_MMAP: mmap+memcopy instead pread+pwrite #10832

Open
wants to merge 1 commit into
base: 9.2.x
Choose a base branch
from

Conversation

monkuta
Copy link

@monkuta monkuta commented Nov 22, 2023

Allows for only-in-memory caching for usecases where such behavior is needed (i.e. Live Video caching). It maps storage directly into user space memory, so reads and writes are being done by a memcpy (without calls to io).

apt install libaio-dev
autoreconf -if
./configure --enable-mmap --enable-experimental-linux-native-aio
./configure --enable-mmap

@bryancall
Copy link
Contributor

bryancall commented Nov 27, 2023

Do you have a benchmark comparing the performance of mmap vs pread?

New features would go into the master branch and we most likely wouldn't backport this change into 9.x at this point in time because we are focusing on releasing ATS 10.

If this feature gets added to master / ATS 10. You could cherry pick the change to your branch of 9.x.

@shukitchan
Copy link
Contributor

is there a reason why this cannot be a configuration parameter in records.yaml and has to be a compile time option?

@moleksy
Copy link

moleksy commented Dec 6, 2023

@bryancall
In a Sapphire Rapids system with 100Gbps NIC we observed 10x lower mean latency (2.7ms vs 28ms), also maximum obtainable transfer rate was higher by 22% (9.4GBps bs 7.7GBps).
Test was done on Ubuntu 22.04 using vegeta, live video 1080p simulation (1MB objects), TLS, 30% cold cache, 70% cached, total volume of 14GB of cached objects.

The main use cases are the users who are targeting lower-volume data with very low desired latency (like live video).

@moleksy
Copy link

moleksy commented Dec 11, 2023

@SolidWallOfCode
Hello Alan, would you like us to provide additional information so that the PR can be approved?
Best Regards
Maciej

@moleksy
Copy link

moleksy commented Jan 15, 2024

@bryancall Would you be able to review this PR?

@zwoop zwoop requested review from zwoop and removed request for SolidWallOfCode February 6, 2024 17:05
Copy link
Contributor

@zwoop zwoop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, why is this against the 9.2.x branch? Is this a back port of something from Master?

@moleksy
Copy link

moleksy commented Feb 6, 2024

We developed it for 9.2.x, but we can also make it work for the master branch. Can it be incorporated into 9.2?

@monkuta monkuta requested a review from zwoop February 7, 2024 07:30
@masaori335
Copy link
Contributor

@moleksy Our development flow is a). merge in to the master branch first, and b). backport commits to the latest branch if needed

Please open a PR against the master branch. (or change the target branch of this PR) You might need to adjust your autotools config into CMake because we're in the middle of building tool migration.

In a Sapphire Rapids system with 100Gbps NIC we observed 10x lower mean latency (2.7ms vs 28ms), also maximum obtainable transfer rate was higher by 22% (9.4GBps bs 7.7GBps).

We also need more benchmark with this, but the number you talked is pretty interesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants