Skip to content

关于mmap开启的提问 #40835

Mar 21, 2025 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

不开启mmap时,数据是加载在内存中,访问很快,但内存消耗大
开启mmap时,数据文件做了mmap映射,访问没有直接读内存快,但比从storage访问要快得多,内存消耗比不开启mmap要小

内存管够的:就把mmap全都关了,数据全都进内存,查询最快
内存不管够的:对于经常参与计算,或者需要output_fields返回的字段,不开启mmap;对于不经常参与计算的,开启mmap

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@IeohMingChan
Comment options

@yhmo
Comment options

yhmo Mar 21, 2025
Collaborator

Answer selected by IeohMingChan
@IeohMingChan
Comment options

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