# 使用限制 (/products/qvm/cloud-database/cloud-database-rds/polardb/3-polardb-use-restrictions)



最近更新时间: 2021-03-15 17:20:27

本文为您介绍PolarDB的相关使用限制。

# PolarDB MySQL [#polardb-mysql]

| 节点规格                    | 文件系统占用内存 | 文件个数上限  |
| ----------------------- | -------- | ------- |
| polar.mysql.x2.medium   | 450 MB   | 1026048 |
| polar.mysql.x4.large    | 850 MB   | 2050048 |
| polar.mysql.x4.xlarge   | 850 MB   | 2050048 |
| polar.mysql.x8.xlarge   | 850 MB   | 2050048 |
| polar.mysql.x8.2xlarge  | 850 MB   | 2050048 |
| polar.mysql.x8.4xlarge  | 850 MB   | 2050048 |
| polar.mysql.x8.12xlarge | 850 MB   | 2050048 |

以上表格中的参数解释如下：

* 文件个数上限：
  包括用户文件、数据库系统库文件（约100个）、日志文件（使用SHOW POLAR LOGS可查看日志文件数量）等。一个普通的PolarDB表占用两个文件，一个分区表占用N+2个文件（N为分区数）。文件数量达到上限后，继续创建表会提示如下错误：

```
ERROR 3017 (HY000): Too many files. PolarDB only supports 2048 files every 10GB disk size. Please drop some tables/databases before creating new tables
```

此时需要删除部分表或者升级集群规格。

* 文件系统占用内存：
  当集群达到存储空间上限，且处于正常读写（非性能压测，没有大表DDL）的情况下，文件系统所占用的内存。如果集群没有达到存储空间上限，文件系统占用的内存小于此参数。

# PolarDB PostgreSQL [#polardb-postgresql]

| 节点规格                 | 文件个数上限   |
| -------------------- | -------- |
| polar.pg.x4.medium   | 1048576  |
| polar.pg.x4.large    | 2097152  |
| polar.pg.x4.xlarge   | 2097152  |
| polar.pg.x8.xlarge   | 4194304  |
| polar.pg.x8.2xlarge  | 8388608  |
| polar.pg.x8.4xlarge  | 12582912 |
| polar.pg.x8.12xlarge | 20971520 |
| polar.o.x4.medium    | 1048576  |
| polar.o.x4.large     | 2097152  |
| polar.o.x4.xlarge    | 2097152  |
| polar.o.x8.xlarge    | 4194304  |
| polar.o.x8.2xlarge   | 8388608  |
| polar.o.x8.4xlarge   | 12582912 |
| polar.o.x8.12xlarge  | 20971520 |

文件个数上限：包括用户表文件、数据库系统表文件（大约1000个）、日志文件等。一个普通的PolarDB表（非分区表）占用3个文件（数据文件、visibilitymap文件、fsm文件，使用索引的话，每个索引一个文件）。文件数量达到上限后，继续创建表会提示类似以下错误：

```
could not create file
```

此时需要删除部分表或者升级集群规格。
