Redis

作者: mjzxcvbnm | 来源:发表于2022-04-09 14:15 被阅读0次

    redis命令定义

    redisCommandTable

    AOF

    redis在执行完命令后通过接口feedAppendOnlyFile将对应的命令写入到缓存aof_buf中,
    在epoll休眠前调用beforeSleep->flushAppendOnlyFile将缓存写入到AOF文件中,redis根据appendfsync配置的方式进行fsync文件同步。后台fsync通过aof_background_fsync将job任务写入到bio_jobs中,由REDIS_BIO_AOF_FSYNC类型的线程一步处理。

    Allocator


    Selecting a non-default memory allocator when building Redis is done by setting
    the MALLOC environment variable. Redis is compiled and linked against libc
    malloc by default, with the exception of jemalloc being the default on Linux
    systems. This default was picked because jemalloc has proven to have fewer
    fragmentation problems than libc malloc.

    To force compiling against libc malloc, use:

    % make MALLOC=libc
    

    To compile against jemalloc on Mac OS X systems, use:

    % make MALLOC=jemalloc

    相关文章

      网友评论

          本文标题:Redis

          本文链接:https://www.haomeiwen.com/subject/peepsrtx.html