# 调整 TiDB Server 参数（B）

+ 启用临时磁盘
  + oom-use-tmp-storage 
  + tmp-storage-path
  + tmp-storage-quota
 
![center](./student-guide/diagram/23-parameter-02-01.png)

-------------------------------------------------------------

  - oom-use-tmp-storage
    - 设置是否在单条 SQL 语句的内存使用超出 mem-quota-query 限制时为某些算子启用临时磁盘。默认为 true
  - tmp-storage-path
    - 单条 SQL 语句的内存使用超出 mem-quota-query 限制时，某些算子的临时磁盘存储位置。
    - 默认值为：<操作系统临时文件夹>/<操作系统用户ID>_tidb/<host>:<port>/<statusHost>:<statusPort> 的 base64 编码结果/tmp-storage。
  - tmp-storage-quota
    - tmp-storage-path 存储使用的限额，单位是 Byte。当单条 SQL 语句使用临时磁盘，导致 TiDB Server 的总体临时磁盘总量超过 tmp-storage-quota 时，当前 SQL 操作会被取消，并返回 Out Of Global Storage Quota! 错误。
    - 当 tmp-storage-quota 小于 0 时则没有上述检查与限制。
