Repository navigation
Commit 9399d8f
committed
fix(seaweedfs): raise the bucket ceiling by sizing volumes smaller
A volume server started with -max 0 derives its slot count from free
disk, minus the headroom its existing volumes still claim, divided by
the master's volume size limit. An unfilled volume reserves its whole
limit, so a volume counts against the budget for as long as it stays
writable. Replication 001 puts a copy on each of the two servers, so a
logical volume costs a slot on both, and the master asks for six
logical volumes per collection, keeping whatever fit when the slots
run out.
On a 10 GiB volume PVC at 1000 MB the unnamed default collection takes
six slots at first write. Those six reserve 6000 MB of the roughly
9900 available, leaving 3900 unclaimed and worth three more slots, so
the server reports nine and only three are ever reachable by a bucket.
One bucket can use them; the next is answered with "Not enough data
nodes found" while the disk is still almost entirely free.
At 250 MB the same PVC yields about thirty-nine slots, so five more
full collections fit beside the default one. The price is four times
as many volume files, each a .dat and an .idx: a 10 TiB volume server
holds roughly 84k of them at this limit against 21k at 1000 MB, enough
to cross a 65536 nofile limit where one is set. That count scales with
data actually stored, and on a much larger PVC it is the reason to
raise this value rather than lower it further.
Existing volumes larger than the new limit keep working. The volume
server takes the new limit from its heartbeat and never marks a volume
read-only for exceeding it, and the master only drops such a volume
from its writable set, so it stays readable while new writes go to
freshly grown volumes.
Unit tests pin both rendered flags. The limit is only half the
arithmetic: the volume server's -max 0 is what makes the slot count
auto-derived in the first place, and the template branch rendering it
exists only because 0 is falsy in Go templates, so it reads as a
redundant special case. Dropping it in a later simplification would
pin the count to 7, leaving the master's flag rendering 250 while the
slot arithmetic silently stopped applying.
Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <[email protected]>1 parent 79602e9 commit 9399d8f
2 files changed
Lines changed: 62 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
39 | 52 | | |
40 | 53 | | |
41 | 54 | | |
| |||
0 commit comments