【问题标题】:How to minimize HDD usage in tarantool如何在 tarantool 中最小化 HDD 的使用
【发布时间】:2021-01-31 02:44:28
【问题描述】:

我在 7 英寸的 Raspberry Pi 上安装了 tarantool,并希望尽量减少它与 HDD(SD 卡)的交互。 有什么简单的方法可以做到这一点。 硬盘的真正用途是什么?

【问题讨论】:

    标签: tarantool


    【解决方案1】:

    这是一个广泛的主题,答案取决于您的应用程序正在解决的任务。 tarantool 中有memtxvinyl engines。每个都有不同的目标,并有自己的configuration options。两者都适合生产使用。

    但我假设您只是在玩玩,并希望尽可能减少磁盘使用量。因为这个 tarantool 有temporary 空格,它没有持久性,这意味着所有数据都存储在内存中而不保存到磁盘。

    此外,还有wal_mode 配置选项,它会禁用整个实例的 wal 日志记录。这是一个如何使用它的简单示例:

    box.cfg({ wal_mode = 'none' }) -- do not write wal logs 
    box.schema.create_space('test', {temporary = true}) -- do not persist its data to disk
    box.space.test:create_index('primary')
    box.space.test:insert({1})
    box.space.test:insert({2})
    box.space.test:select()
    

    还有很多其他选项,您可以使用它来调整磁盘使用情况。查看documentation

    【讨论】:

    • 您还应该查看checkpoint_count 选项,它可以减少磁盘上维护的快照数量,以及checkpoint_interval,它管理它们的写入频率。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-10-13
    • 2023-03-31
    • 2021-04-11
    • 2019-01-15
    • 2018-03-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多