PolarDB-FileSystem icon indicating copy to clipboard operation
PolarDB-FileSystem copied to clipboard

Running PFS requires very powerful distributed storage support - it is necessary to consult and evaluate the application scenario before use

Open julor opened this issue 6 months ago • 1 comments

The Polardb for Postgres storage computation separation structure is excellent, but its usage scenarios require strict requirements. Recently, the performance of Polardb for Postgres was tested using Ceph RBD. PFS and ext4 were compared on the basis of Ceph RBD storage. Under the same hardware conditions, the performance of PSF version was less than 1/20 of ext4 version. Careful analysis of the reason: PFS was developed for cluster sharing and uses direct IO technology. All reads and writes require storage of hard drives, and there is no operating system buffer IO as an intelligent cache. Read and write operations also require memory alignment, further increasing the burden on the disk, resulting in storage performance far inferior to ext4 under the same hardware conditions.

julor avatar Aug 15 '25 02:08 julor

Thanks for your attention. As you mentioned, PFS is not a good choice for general requirements. This is because

  1. PFS is designed for OLTP database workload such as MySQL and Postgres. These databases use buffer pool to manage in-memory cache of database pages, usually 8KB (exactly 2 disk pages), and the OS-level file cache is not necessary. That explains why PFS use direct IO - the application is assumed to have built-in caching mechanism.
  2. PFS is designed to work as a single-writer, multiple-reader cluster, or in the context of OLTP databases, one master instance and multiple read-only instances. See more in PolarDB project. This shared-disk architecture introduces much more cost in synchronizing metadata and locks between multiple servers.

fuyufjh avatar Aug 20 '25 06:08 fuyufjh