]> git.proxmox.com Git - pve-cluster.git/commit
pmxcfs: increase max filesize from 128k to 512k
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 12 Sep 2016 15:50:54 +0000 (17:50 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 13 Sep 2016 04:29:29 +0000 (06:29 +0200)
commit342c3c559214d6aa295c58199dd60b294685a55c
tree5d2ffa1a3027a849023e867252c3936166b32062
parent8a60a07df5eb8d0c3e459c6e15ea5c73828c3b69
pmxcfs: increase max filesize from 128k to 512k

This fixes bug 1014 and also fixes a few other problems where user
ran into the file size limitation, I did not found the bug entries
for them, but they covered:
1) there was a maximum of about <1500 services which could be
   managed by our HA manager, as after that the manager_status file
   got to big

2) firewall rules may also reach this limit on a bigger setup

I tested this with concurrent started read/writes of random data
files from and into RAM (tmpfs mounts), as long as we do not flush
often and read everything at once (i.e. write/read with a big block
size) the performance stays good.

The limiting factor in speed is not corosyncs CPG but sqlite, that
can be seen when comparing worst case scenarios between local pmxcfs
and clustered pmxcfs instances and simple debug logging.

We optimize our sqlite usage quite heavy, relevant additional speed
gains cannot be made without loosing reliability, as far as I've
seen.

So I only got into problems if I read/wrote small blocks
with a few hundred big writes started at once, e.g.
for i in {1..100}
do
    dd if=/tmp/random512k.data of="/etc/pve/data$i" bs=1k &
done

As with the above worst case each block gets written as a single
transaction to the database, where each transaction has to be locked
and synced to disk for reliability.
So packing all changes (i.e. the whole file) into one DB transaction
does not produces much overhead of 512k files compared to 128k files

As data written through the PVE framework is written and read in
such a way we can increase this without seeing much of a
performance impact.

It should be also noted that just because files can now get bigger
not a lot will get that. Rather there may be just one to three files
bigger than 128k on some setups.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
data/src/memdb.h