# SysAdmin Tools — Manual

> All seven tabs of SysAdmin Tools in detail: inputs, formulas, limits and generated commands for RAID, chmod, transfer, tuning, SLA, backup, SSD and UPS.

Source: https://www.jpkc.com/db/en/tools/sysadmin/manual/

Back to the overview: [SysAdmin Tools](https://www.jpkc.com/db/en/tools/sysadmin/) · Open the tool: [www.jpkc.com/tools/sysadmin/](https://www.jpkc.com/tools/sysadmin/)

This manual covers every tab of SysAdmin Tools: its inputs, results, formulas and limits. Field and tile names are given exactly as they appear in the interface. For worked walkthroughs see the [examples](https://www.jpkc.com/db/en/tools/sysadmin/examples/); for strategy and pitfalls, the [tips & tricks](https://www.jpkc.com/db/en/tools/sysadmin/tips/).

## Layout and controls

The seven calculators sit side by side as tabs: **RAID & Storage**, **Permissions**, **Transfer**, **Server Tuning**, **Availability**, **Backup** and **SSD & UPS**. They all follow the same pattern:

- **Inputs at the top, results right below.** There is no "Calculate" button — every change recalculates live.
- **Result tiles** show the value in large type, with the label above it and a short note below explaining where it comes from. Values that need attention are colored (warning or error).
- **Expandable explanations** below the results ("Formulas & assumptions", "Model", "Rules …") hold the formulas, assumptions and sources. Rules of thumb are explicitly labeled **Heuristic** there.
- **Code blocks** with commands or configuration have a **Copy** button.
- Top right in every tab: **Copy link** copies a link containing this tab's inputs; **Reset** restores the defaults.

Numbers can be typed with either a decimal point or a decimal comma: `1,5`, `1.234,5`, `1,234.5` and `1 234` are all understood. If a number contains both a point and a comma, the last one is the decimal mark and everything before it must be proper thousands groups. A single separator, however, is **always** read as the decimal mark — so `1,234` means 1.234, not 1234. If you're used to typing thousands separators, leave them out or use a space.

The active tab is stored in the address after the `#` (`#raid`, `#perms`, `#transfer`, `#tuning`, `#sla`, `#backup`, `#hardware`), so you can link straight to a tab. Your inputs are saved per tab in the browser's local storage. A shared link carries one tab's inputs as Base64-encoded JSON in `#<tab>=`; when someone opens it, their browser takes over those values and saves them as well. The tool then trims the address back to the plain tab anchor.

## RAID & Storage

The most extensive tab: it works through a set of drives in a chosen layout and shows capacity, fault tolerance, rebuild, performance, cost, a comparison of all layouts and the commands to create the array.

### Drives: entering your disks

- **Drive type** — `3.5" HDD (7,200 rpm)`, `2.5" HDD (5,400 rpm)`, `SATA SSD` or `NVMe SSD`. The type sets the defaults for power draw, IOPS, MB/s, rebuild rate, URE class and annual failure rate (AFR). A 3.5-inch HDD starts at 5 W idle, 8.5 W active, 150 IOPS, 250 MB/s, a 150 MB/s rebuild rate, URE 10^14 and 1.5 % AFR; an NVMe SSD at 2/7 W, 500,000 IOPS, 5,000 MB/s, a 1,500 MB/s rebuild rate, URE 10^15 and 1 % AFR. You can override all of these further down.
- **Drive rows** with **Count**, **Size per drive** (TB, TiB or GB) and **Price per drive**. **Add drives** adds another row — for mixed sizes, create one row per size. Up to 16 rows and 64 drives are allowed, each drive between 1 GB and 1 PB; an empty price counts as 0.
- **Order matters**: mirror pairs, RAID 50/60 groups and ZFS vdevs take consecutive drives from the list.

When you first open the tab, the default is a RAID 6 of six 8 TB drives at 180 € each.

### Layout and parameters

The **Layout** menu sorts 23 layouts into four groups:

| Group | Layouts (minimum number of drives) |
|---|---|
| Classic RAID (Linux md / hardware) | JBOD / Span (1), RAID 0 (2), RAID 1 (2), RAID 5 (3), RAID 6 (4), RAID 10 (3), RAID 50 (6), RAID 60 (8) |
| ZFS | ZFS stripe (1), ZFS mirror vdevs (2), RAIDZ1 (3), RAIDZ2 (4), RAIDZ3 (5) |
| Btrfs | raid1 (2), raid1c3 (3), raid1c4 (4), raid10 (2), raid5 (2), raid6 (3) — raid5/raid6 carry the suffix "not for production" |
| NAS | Synology SHR-1 (2), SHR-2 (4), Unraid (1 parity) (2), Unraid (2 parity) (3) |

A sentence below the menu describes the selected layout. Two minimums differ from the textbook table because the tool models real Linux behavior: md RAID 10 in the "near" layout already works with 3 drives, Btrfs raid10 with 2 since Linux 5.15. For RAIDZ, on the other hand, the tool deliberately requires at least parity + 2 drives.

Depending on the layout, more parameters appear:

- **Copies per block** (RAID 10): 2-way or 3-way mirror.
- **Groups** (RAID 50/60): number of RAID 5 or RAID 6 groups, 2 to 16.
- **Drives per vdev** (RAIDZ): the width of one vdev; `0` means one vdev made of all drives. Left-over drives that don't fill another vdev stay outside the pool — the tool suggests adding them as hot spares.
- **Drives per mirror** (ZFS mirror vdevs): 2, 3 or 4.
- **ashift** (ZFS): 9 (512-byte sectors), 12 (4 KiB, default), 13 or 14.
- **recordsize** (RAIDZ): 4K to 16M, default 128K.

### Capacity: what's left to use

The tiles show **Usable** (for ZFS after deducting slop space, for Btrfs without metadata), **Raw**, **Efficiency** (usable ÷ raw), **Unused** (space wasted by size differences or left-over drives) and **Tolerates** (guaranteed failures, plus the best case). Capacities are always given in TB **and** TiB. Below that come the calculation as a formula line, notes on the layout and the **Drive usage** table with each drive's size, role, and used and unused share.

How the tool calculates, depending on the system:

- **Classic RAID (md/hardware):** every member counts at the size of the smallest drive — of the whole array for RAID 1/5/6/10, of each group for RAID 50/60. RAID 5 = (n − 1) × smallest, RAID 6 = (n − 2) × smallest, RAID 10 = n × smallest ÷ copies. For RAID 0 the headline figure is n × smallest drive; a note adds that Linux md still uses the extra space of larger drives in zones, while hardware controllers don't.
- **ZFS:** every vdev counts at its smallest drive. For RAIDZ the tool computes padding following Matt Ahrens: B = recordsize ÷ 2^ashift, parity = p · ⌈B ÷ (w − p)⌉, allocated = ⌈(B + parity) ÷ (p + 1)⌉ · (p + 1), data share = B ÷ allocated. `zfs list` always uses the share of a 128 KiB block. If the data share differs from the nominal value, a note tells you what percentage the vdev actually stores. The tool also shows the data share of a 4 KiB block (small files, metadata). OpenZFS ≥ 2.0 **slop space** (1/32 of the pool, at most 128 GiB, at least 128 MiB) is deducted; compression is not factored in.
- **Btrfs:** a simulation of the kernel's chunk allocator. Each chunk goes to the devices with the most free space — for raid1/raid1c3/raid1c4 the 2/3/4 emptiest ones, for raid10 all devices with space left (an even number, two copies), for raid5/raid6 all devices with space left, with a data share of (k − 1)/k or (k − 2)/k. Anything that can't be allocated for lack of further free devices is reported in a note. Metadata and system chunks (typically 1–2 %) are not counted.
- **Synology SHR:** the drives are cut into layers at every drive size that occurs, and each layer is an md RAID across the drives that reach it. SHR-1 = sum − largest drive, SHR-2 = sum − two largest.
- **Unraid:** the largest drive(s) hold parity, every other drive keeps its own file system: usable = sum of the data drives.

If you mix drive sizes in a classic RAID or a ZFS vdev, the tool warns you how much stays unused. For RAID 1, 5, 6 and 10 it also points you to Btrfs, SHR or Unraid; for RAID 50/60 and ZFS it reminds you that drives form groups, vdevs or mirrors in list order. Other notes include: vdevs wider than about 12 drives resilver slowly and deliver the IOPS of a single drive; Btrfs raid5/raid6 is not meant for production because of the write hole; Unraid doesn't stripe, so a file always lives on one data drive.

The "Units" part of the formulas is a reminder about units: drive vendors count in TB (10^12 bytes), `df -h` shows TiB (2^40 bytes). Partition tables, md superblocks and ZFS labels cost a few MiB per drive, and ext4 reserves 5 % for root by default (`tune2fs -m`).

### Fault Tolerance: which failures you survive

Next to the tiles is a table with **Failed drives**, **Surviving combinations** and **Chance the data survives**: for each number of failed drives, the tool enumerates every combination and reports the share in which the data survives — assuming every drive is equally likely to fail.

**Guaranteed** means any combination of that size is survived. **Best case** means that many failures are fine as long as they hit the right drives — one drive per mirror in RAID 10, say, or one per group in RAID 50. Btrfs spreads its chunks across changing device combinations, so there every failure beyond the profile counts as data loss. With Unraid, failures beyond the parity count only lose the failed data drives; the others stay readable.

### Rebuild & Risk

Inputs: **Rebuild rate** (MB/s), **Pool fill** (fill level in %, ZFS and Btrfs only), **Delay until start** (hours until the rebuild begins, e.g. until the replacement drive arrives), **AFR per drive** (annual failure rate) and **URE class** — 10^14 (desktop/NAS HDD), 10^15 (enterprise HDD, client SSD), 10^16 (enterprise SSD), 10^17 or a custom exponent.

The tiles:

- **Rebuild time** — data ÷ rate. A delay you enter appears as a note under the value and extends the window in which further failures are counted (**Another drive fails**). md and hardware RAID resync the whole member; a ZFS resilver and a Btrfs replace copy only allocated data (× fill level). The worst drive or group is shown.
- **URE risk** — 1 − e^(−bits ÷ URE) over the data that has to be read **without** remaining redundancy: all other drives of a RAID 5/RAIDZ1/SHR-1 group, or the mirror partner in RAID 1/10. If redundancy is left after a failure (RAID 6, RAIDZ2 …), the tile reads "≈ 0".
- **Another drive fails** — the probability that one of the relevant drives fails during the rebuild window: 1 − (1 − AFR)^(h ÷ 8760) per drive.
- **Data loss by failures** — the probability that as many further drives fail as the layout can no longer take.
- **Rebuild risk** — everything combined. For layouts with two or more levels of redundancy this also includes the case "one failure fewer, followed by a URE with no redundancy left" — according to the tool usually the largest part for RAID 6/RAIDZ2.
- **After N failures** (only with double redundancy or more) — the URE risk of the rebuild after the last tolerated failure, when nothing redundant is left.

Without redundancy (JBOD, RAID 0, ZFS stripe) the tile reads "Rebuild: not possible" — a failed drive then means restoring from backup. The explanation "Formulas & why the URE numbers look scary" puts the figures in context: URE classes are datasheet upper bounds and real drives usually do far better; failures cluster (same batch, same age, rebuild stress), so the failure figures are more of a lower bound; thanks to checksums, ZFS and Btrfs report a URE as one damaged file, whereas md may abort the rebuild. And: RAID is no backup.

### Performance (theoretical)

From **Sequential per drive** (MB/s) and **Random IOPS per drive**, the tool computes upper bounds: **Sequential read**, **Sequential write**, **Random read**, **Random write** and **Write penalty** (drive I/Os per random write). Reads can use every member, sequential writes the data drives, and random writes are divided by the write penalty (RAID 1/10: one per copy, RAID 5: 4, RAID 6: 6). For random I/O, RAIDZ delivers roughly the IOPS of one drive per vdev. Controller, CPU, caches, network and file system are not taken into account — the tool recommends benchmarking with `fio` before you rely on the numbers.

### Power & Cost

Inputs: **Idle** and **Active** (watts per drive), **Time active** (share in %, default 20), **Currency** (EUR, USD, GBP, CHF) and **Electricity price** per kWh (default 0.30). Results: **Power** (average draw), **Energy per year** (24/7), **Electricity per year** (with a monthly figure), **Heat** in BTU/h, **Drives** (sum of drive prices) and **Price per usable TB** (plus per TiB).

The math: drives × (idle × (1 − active share) + active × active share), across every drive in the list including unused ones; kWh per year = W × 8,760 h ÷ 1,000; 1 W = 3.412 BTU/h. Only the drives are counted — controller, backplane, fans and PSU losses come on top.

### Layout Comparison

A table of every layout possible with your drives, showing **Usable**, **Efficiency**, **Tolerates**, **Rebuild**, **Rebuild risk**, **Read / write** and **Price / TB** — computed with your rebuild and price settings. **Use** switches to a layout; the current row carries the badge "current". The **Show impossible layouts** switch also lists layouts your drives aren't enough for. Parameters that don't fit the drives fall back to a default in the table (RAIDZ: one vdev of all drives). "Rebuild risk" here means the risk after **one** failed drive.

### Commands

Under **Device names** you enter the device paths in drive order (separated by spaces or lines), plus **Pool name / label** (default `tank`) and, for md, the **File system** (ext4 or XFS). Missing names are replaced by the placeholders `/dev/disk/by-id/DISK-01`, `DISK-02` … A red notice and the script header warn that the commands erase **all data** on the devices and recommend `lsblk -o NAME,SIZE,MODEL,SERIAL` and paths under `/dev/disk/by-id/`.

- **md:** `mdadm --create /dev/md0 --level=… --raid-devices=…` with a 512 KiB chunk (the mdadm default), for RAID 10 with `--layout=n2`/`n3`; RAID 50/60 as nested md (one array per group, RAID 0 on top). Then `mkfs.ext4` with a matching `-E stride=…,stripe-width=…` or `mkfs.xfs` (which reads the md geometry itself), adding the array to `mdadm.conf` together with `update-initramfs -u` (Debian/Ubuntu path; on RHEL `/etc/mdadm.conf`), and `cat /proc/mdstat` to watch the initial sync.
- **ZFS:** `zpool create -o ashift=12 -O compression=lz4 tank raidz2 …` (recordsize only if it differs from 128K), left-over drives via `zpool add … spare`, then `zpool status` and `zfs list`.
- **Btrfs:** `mkfs.btrfs -L tank -d <profile> -m <profile>` — metadata gets at least the redundancy of the data (raid1c3 for raid6 data, raid1c4 for raid1c4), then mounting and `btrfs filesystem usage`.
- **SHR and Unraid** have no shell command: instead the tool describes the path in Synology DSM (Storage Manager → Create → Storage Pool → SHR) or in the Unraid web UI (Main → Array Devices: parity first, then the data drives).

## Permissions

The tab "Permissions: chmod, umask & ls -l" converts file permissions in every direction. Its model is GNU coreutils `chmod` 9.4 — not an abstract POSIX — including its quirks with directories.

### Mode: setting and reading permissions

- **Applies to** — **File** or **Directory**. The choice changes the explanations, warnings and commands.
- **Bit grid** with rows Owner (`u`), Group (`g`), Others (`o`) and columns **Read 4**, **Write 2**, **Exec 1** and **Special** (setuid, setgid, sticky); the "Digit" column shows the octal digit per class.
- **Octal** (e.g. `0644`), **Symbolic (as in ls -l)** (e.g. `rw-r--r--`) and **Read an `ls -l` line** — all three fields are linked to the grid. An `ls -l` line also yields type, owner, group, link count and name; a `+` after the mode reports an ACL ("getfacl shows more rights"), a `.` an SELinux context, an `@` macOS extended attributes. For symlinks, the tool points out that their mode is never used.
- **Presets** with an explanation in the tooltip: `644` (regular files), `755` (directories and programs), `600` (private files such as SSH keys, `.env`), `700` (private directories such as `~/.ssh`), `640` (config for a service group such as `www-data`), `750`, `775`, `2775` (shared project directory, setgid), `1777` (like `/tmp`), `4755` (setuid program like `/usr/bin/passwd`), `400` (certificates, `.pem` keys) and `0444`. The presets `2775` and `1777` switch the type to **Directory**, `4755` to **File**; all others leave the **Applies to** choice as it is.

### Result: meaning and warnings

The **Octal** tile (with the `stat -c %a` form) and the **ls -l** tile show the mode. Below them come warnings, graded by severity. Examples: `777` ("It rarely fixes the real problem" — better to set owner and group properly with `chown` and use 755/775 or 644/664), a world-writable directory without the sticky bit, a world-writable file, a setuid/setgid program others can write to, setuid programs in general (with the search command `find / -xdev -perm -4000 -type f`), a capital `S` (setuid/setgid without x), setuid on directories (ignored by Linux), r without x on a directory, or an owner with fewer rights than group or others.

"What each bit does here" explains every set bit for the selected type — for instance, that Linux ignores setuid on scripts (`#!`). "How the kernel checks" sums up the check logic: exactly one class applies (owner, then group, then others — bits are never added up), root skips the r/w checks and needs at least one x bit to execute, and deleting or renaming is a write to the **directory**.

### Commands: setting exactly this mode

With an optional **Path** (otherwise the placeholder `FILE` or `DIR`; paths are quoted for the shell), "This mode, exactly" produces four lines: the numeric `chmod`, the equivalent symbolic `chmod`, an `install` variant (`install -m … SOURCE FILE` or `install -d -m … DIR`) and `stat -c '%a %A %n'` to verify.

For directories the tool writes the numeric mode with **five digits** (`chmod 00755`, `chmod 02775`) and appends `,-s` or `,u-s` to the symbolic form. The reason: GNU `chmod` leaves setuid/setgid on directories in place with four-digit modes; only this way does the command really set the mode exactly. For files with setuid/setgid, a note reminds you to run `chown` before `chmod`, because changing the owner clears these bits.

Below that, **Tree: directories** and **Tree: files** (default 755/644) build commands for a whole tree: `find … -type d -exec chmod … {} +` and `find … -type f -exec chmod … {} +`. Where possible, the tool adds the single-pass variant `chmod -R u=rwX,g=rX,o=rX …` (the capital `X` sets execute only for directories and for files that already have an x). The tree commands deliberately use four digits so that setgid on shared directories is preserved; they don't follow symlinks, and `-type f` skips devices, sockets and pipes. You get warnings for world-writable trees, directories without r+x for the owner (then `find` can no longer descend), x on every file, and setuid/setgid on every file.

### Apply a chmod Expression

This is where you simulate a `chmod` call: **Start mode**, **Type** (File/Directory), **Expression** and **umask**, plus the switch "Clauses without u/g/o/a are filtered by the umask". Example buttons fill in common expressions: `u+x`, `go-w`, `a+X`, `u=rwX,g=rX,o=`, `g=u`, `+x`, `-w`, `g+s`, `o+t`, `=755`, `00755`.

Results: **Result** (mode and `ls -l` form), **Changed** (bits added and removed), and where relevant **umask filtered**, **Directory rule** and **Note**. A step table shows the intermediate state after each clause. Invalid expressions get the same message `chmod` prints ("invalid mode"). **Load result into the mode editor** copies the result up to the mode section.

The rules from "Rules (GNU coreutils chmod)":

- Syntax `[ugoa]*([-+=]([rwxXst]*|[ugo]))+`, several clauses separated by commas, or an octal number. `u`/`g`/`o` after the operator copy the current bits of that class (`g=u`).
- Without `u`/`g`/`o`/`a`, the umask filters the change — for `-` and `=` too. Under umask 022, `chmod -w f` only removes the owner's w. `a` is not filtered, and neither are special bits.
- `X` sets execute only on directories and on files that already have an x bit — checked at exactly that point in the expression.
- `s` works with `u`/`g`, `t` with `o` (or with no class); `o+s` and `u+t` do nothing.
- Directories: `chmod 755 dir`, `chmod 0755 dir` and `chmod u=rwx,g=rx,o=rx dir` leave setgid in place; `g-s`, `-s`, five or more digits (`00755`) or `=755` clear it. BSD or BusyBox `chmod` may behave differently; the fact that the kernel can clear setgid when you're not in the file's group is not modeled.

### umask

In the **umask** field you enter an octal (`022`) or symbolic umask (`u=rwx,g=rx,o=`); the buttons `022`, `002`, `027` and `077` cover the usual cases (default on most distributions, user private groups, servers, private). The tiles show **umask** with the `umask -S` form, **New files** (from a requested 0666) and **New directories** (from 0777), plus notes when the umask takes rights away from the owner or makes everything world-writable. A symbolic input is applied to 022, as the shell would apply it to the current umask — and the tool only supports the notations that dash and bash understand the same way.

"Set it" provides the matching lines: `umask 0022` (this shell; persistent in `~/.profile`), `UMask=0022` (systemd unit, `[Service]` section), `UMASK 022` (`/etc/login.defs`, for logins via pam_umask) and `umask -S` to check. The formula: new mode = requested mode AND NOT umask. Most programs request 0666 or 0777, some less (`ssh-keygen` 0600) — the umask only removes bits and never adds an x to files. A default ACL on the parent directory replaces the umask.

### Read an ls -l Listing

Paste the output of `ls -la` into the text box (up to 200 entries). The tool shows a table with **Name**, **Type**, **ls -l**, **Octal**, **Owner:group** and **Notes** — that's where flags such as ACL, SELinux, setuid, setgid, sticky, world-writable, writable setuid/setgid or "owner < group/others" appear. The arrow button on a row loads its mode into the editor. The listing is not saved and not included in links.

## Transfer

The tab "Transfer & Bandwidth" works with data amounts and rates. For sizes you can choose decimal (kB … PB) and binary units (KiB … PiB), for rates bit/s up to Tbit/s as well as B/s, kB/s, MB/s, GB/s, KiB/s, MiB/s and GiB/s.

### Transfer Time, Rate & Amount

Under **Calculate** you choose what you're looking for: **Time**, **Rate** or **Amount**. The other two of the fields **Amount**, **Line rate** and **Time** (as `h:mm:ss`, seconds, minutes, hours or days) are the inputs; buttons set common rates from 100 Mbit/s to 25 Gbit/s. The results show the value you're after including protocol overhead, and **Without overhead** for comparison.

The formulas: time = amount × 8 ÷ (line rate × efficiency), rate = amount × 8 ÷ (time × efficiency), amount = rate × efficiency × time ÷ 8. The efficiency comes from the **Protocol Overhead** section. Decimal prefixes are used throughout: 1 Gbit/s = 10^9 bit/s = 125 MB/s = 119.2 MiB/s. Disks, CPU (encryption, compression), the far end and the network in between are not included — whichever is slowest sets the real speed.

### Protocol Overhead

- **Overhead model**: **TCP over Ethernet** (default), **None (raw line rate)** or **Custom efficiency** (your own percentage, e.g. an iperf3 result ÷ line rate).
- For TCP: **MTU** (576 to 9216, from 1280 with IPv6; buttons 1500 and "Jumbo 9000"), **IP version** (IPv4/IPv6) and the switches **TCP timestamps** (12 bytes, on by default in Linux), **802.1Q VLAN tag** (4 bytes outside the MTU) and **PPPoE** (8 bytes inside the MTU, e.g. on DSL).

The table "One full-size frame on the wire" breaks a full frame down byte by byte: preamble + SFD, Ethernet header, VLAN tag and PPPoE where applicable, IP header, TCP header, timestamps, payload, checksum and interframe gap. Per frame, preamble, header, FCS and gap cost 38 bytes outside the MTU; inside it come IP (20 or 40 bytes), TCP (20 bytes) and, if enabled, 12 bytes of timestamps. With IPv4, MTU 1500 and timestamps, that leaves 94.15 % of the line rate as payload; with jumbo frames about 99 %, with IPv6 92.85 %. Not included are retransmissions, TLS (≈ 0.1–0.2 %), SSH or VPN encapsulation (WireGuard: 60 bytes per packet over IPv4, 80 over IPv6) and slow start.

### Link Comparison

A table with the transfer time for the amount entered above across common connections: Ethernet from Fast Ethernet to 100 GbE, internet connections (50/100/250 Mbit/s, fiber 1 Gbit/s), Wi-Fi 5 and 6, USB 2.0 to USB4/Thunderbolt, SATA II/III, NVMe PCIe 3.0 to 5.0 and a 3.5-inch HDD. The columns:

- **Nominal** — the advertised figure: the MAC data rate for Ethernet, the signaling rate for USB, SATA and PCIe, the PHY rate for Wi-Fi.
- **Ceiling** — the hard upper limit after line coding (8b/10b = 80 %, 128b/130b = 98.5 %) or framing.
- **Realistic** — for Ethernet and internet, nominal × the TCP efficiency from above; rows marked with ≈ are typical guide values, not a measurement of your hardware (such as ≈ 40 MB/s for a USB 2.0 drive, or ≈ 50 % of the PHY rate close to the access point for Wi-Fi).
- **Time** — the duration for your amount.

### Units: Decimal ↔ Binary, Bits ↔ Bytes

A value in any unit (bytes decimal or binary, bits decimal or binary) is converted into four tables, along with a sentence such as "4 TB = …". The **Larger by** column shows how much bigger the binary unit is — 2.4 % at kilo, 9.95 % at tera. The explanation "Why a 4 TB drive shows “3.7T” (or less)": `ls -lh`, `df -h` and `du -h` calculate in powers of two but print only the letter — and they round **up**. `df -H` uses decimal units. On top of that, the file system takes its own share.

### Monthly Traffic

Two directions: **Rate → traffic** and **Traffic → rate**. Inputs are **Average rate** (a sustained rate around the clock), **Traffic per month** and **Month length** — the average month (365.25 ÷ 12 = 30.44 days) or 30 days, as many hosting providers bill. Formula: traffic = rate ÷ 8 × seconds per month (30 days = 2,592,000 s, average = 2,629,800 s); 1 Mbit/s around the clock comes to 324 GB in a 30-day month. The result is an average — real traffic follows a daily curve, and the peak sits well above it.

### 95th Percentile (Burstable Billing)

For 95th-percentile billing you paste samples, one per line — rates, not byte counters. **Example** fills in sample data, **Clear** empties the box. Options: **Bare numbers are** (unit for numbers without a unit), **Value column** (last number on the line or column 1–8), **Decimal mark** (Auto, point, comma), **Percentile** (default 95) and **Interval** (1, 5, 15 or 60 minutes).

The method is "nearest rank": sort ascending, rank = ⌈p ÷ 100 × n⌉, and the value at that rank is what gets billed — the top 5 % drop out. For 30 days of 5-minute samples that's 8,640 data points, of which 432 (36 hours of peak load) don't count. Units after numbers (`Mbit/s`, `Mbps`, `MB/s`, `MiB/s`, `1.2G` …) are honored, with `b` for bit and `B` for byte. Unknown units, empty lines, `#` comments, header lines and `nan` are skipped and listed — the tool never silently reads a number with an unknown unit in the default unit. More than 8,000 characters of samples are stored neither in the browser nor in the link.

### Bandwidth-Delay Product & TCP Window

Inputs: **Line rate**, **Round-trip time** (ms, buttons from "LAN 0.3 ms" to "Worldwide 250 ms"), **TCP window** and optionally **Packet loss** (%). The tiles show the **Bandwidth-delay product** (rate × RTT ÷ 8 — that many bytes have to be in flight to fill the link), **Buffer (2 × BDP)**, **Window limit** (at most one window per round trip), **Without window scaling** (window of 65,535 bytes), with packet loss the **Loss limit (Mathis)**, and as the bottom line **One TCP stream ≤**.

The block "sysctl for this BDP" provides a file `/etc/sysctl.d/90-tcp-buffers.conf`. Linux needs about twice the window as buffer, so the tool rounds 2 × BDP up to whole MiB. The snippet only raises maximums and never lowers the kernel defaults (`tcp_rmem` up to 6 MiB, 32 MiB since Linux 6.16; `tcp_wmem` 4 MiB): it never sets `tcp_rmem` below 32 MiB, and if 2 × BDP fits within the defaults it just says "Nothing to change". "Apply, check & measure" contains `sysctl -p`, a query of the current values, and `ping` and `iperf3` for measuring. The Mathis limit (≤ MSS × 8 ÷ RTT × 1.22 ÷ √loss) applies to Reno-style congestion control; CUBIC does somewhat better, and BBR doesn't follow the model. Parallel streams (`iperf3 -P`, `rclone --transfers`) multiply every limit.

## Server Tuning

This tab sizes a web server as a whole: a memory plan divides up the RAM, and the sections for PHP-FPM, OPcache, MySQL/MariaDB, nginx and Apache build on it and deliver config snippets.

### Server & Memory Plan

- **RAM** (GiB/MiB), **CPU threads** (as reported by `nproc`), **Reserve: OS & other services** (kernel, minimum page cache, sshd, monitoring, Redis …).
- **Web stack**: `nginx + PHP-FPM`, `Apache event + PHP-FPM` or `Apache prefork + mod_php`. Sections that don't belong to the selected stack are marked as inactive with a note (the nginx figures stay usable anyway, e.g. for nginx as a reverse proxy in front of Apache).
- **Paths for**: `Debian / Ubuntu` or `RHEL / Alma / Rocky` — determines the file paths in the snippets (e.g. `/etc/php/8.3/fpm/pool.d/www.conf` versus `/etc/php-fpm.d/www.conf`).
- **PHP version**: 8.1 to 8.5.
- Switch "The database runs on this server": when on, the plan reserves the database's worst case from the MySQL/MariaDB section.

The table subtracts the reserve from the RAM, the database worst case if applicable, and the Apache processes for the event stack. What's left is **Available for PHP-FPM workers** (or for Apache + mod_php); below it you see how much is in use at full load and what remains. If nothing remains, the plan reports it as an error.

### PHP-FPM Pool

Inputs: **Ø RSS** (average memory of one worker in MiB), **Pools**, **Pool name**, **Traffic** ("Varies, with daily peaks", "Steady and busy", "Low or occasional"), **Process manager `pm`** (the recommendation, or fixed `dynamic`/`static`/`ondemand`), **min_spare**, **max_spare**, **start** (empty = automatic), **max_requests**, **idle** (seconds, for ondemand) and **memory_limit**. With `Apache prefork + mod_php` the section is inactive, since PHP then runs inside the Apache processes.

- `pm.max_children = floor(available ÷ pools ÷ Ø RSS)`.
- The `pm` recommendation: `ondemand` for low traffic or from four pools up (idle pools give memory back), `static` for steady load and a single pool, `dynamic` otherwise. The reasoning appears below the tiles ("Why dynamic: …").
- **Heuristic:** min_spare ≈ 10 %, max_spare ≈ 30 % of max_children (at least 1). The tool leaves `pm.start_servers` at the PHP default of min + (max − min) ÷ 2. It checks the same condition as php-fpm, which otherwise refuses to start: 0 < min_spare ≤ start ≤ max_spare ≤ max_children — and the messages are php-fpm's own.
- **Heuristic:** `pm.max_requests = 500` recycles workers that leak memory (PHP default 0 = never).
- **Worst case** = memory_limit × all workers — only reached if every request hits the limit at the same time. If that exceeds the available memory, a note appears.

The block "Measure the average RSS of the workers" provides a `ps`/`pgrep` one-liner that measures only the workers (the pattern `php-fpm: poo[l]` leaves out the master and the command itself), plus a PSS variant via `/proc/<pid>/smaps_rollup`. RSS counts the shared OPcache in every worker, so the result errs on the safe side; PSS is closer to the truth. "Pool configuration" is the finished pool section with `pm`, `pm.max_children`, the spare or idle values depending on the mode, `pm.max_requests` and `pm.status_path = /fpm-status`.

### OPcache

Inputs: **Document roots** (for the counting command), **PHP files**, **Headroom** (%, default 20), **KiB / file** (default 32), **memory** and **interned** (MB, empty = automatic), **Changed files** ("Check timestamps (edits go live)" or "Never check (deploy resets cache)") and **revalidate** (seconds). "Count the PHP files" produces `find … -type f -name '*.php' | wc -l`.

- **Max. files** = files + headroom; **Hash slots** = the first prime ≥ this setting from the table in PHP's `zend_accelerator_hash.c` (…, 7963, 16229, 32531, 65407, 130987 …), because that's exactly how large PHP makes the table.
- The allowed range is 200 to 1,000,000. PHP **rejects** a value outside it rather than clamping it: the default of 10,000 with 16,229 slots stays in effect (according to the tool, tested with PHP 8.2 to 8.5).
- **Heuristic** for memory: files × KiB per file × 1.25 plus the interned strings buffer, rounded up to 32 MB, at least 128. Measured guide values with PHP 8.4: WordPress core 33 KiB per file, WordPress with plugins 20, TYPO3 14 14, Joomla 6 12.
- **Heuristic** for the interned strings buffer: about 3 KiB per file, at least 8 MB. It is carved **out of** `memory_consumption` — if it's just as large, OPcache won't start.

The block "php.ini (drop-in file)" contains `opcache.enable`, `memory_consumption`, `interned_strings_buffer`, `max_accelerated_files` and, depending on your choice, `validate_timestamps = 1` with `revalidate_freq`, or `validate_timestamps = 0` with the note that deploys must reset the cache. Below it you see how to apply the change (`systemctl reload` for PHP-FPM, an Apache restart for mod_php) — and that doing so empties the cache. To check under load, the tool recommends `opcache_get_status()` from a web request (the CLI has its own cache): `oom_restarts` and `hash_restarts` should stay at 0.

### MySQL / MariaDB (InnoDB)

Inputs: **Server** (`MySQL 8.4`, `MySQL 8.0 (≥ 8.0.30)`, `MariaDB 10.11 / 11.4 / 11.8`, `MariaDB 10.5 / 10.6`), **Buffer pool size** (share of the RAM, "Dedicated database server" or a fixed size), **chunk**, **instances**, **max_connections**, the switch **Binary log on** and **Redo log size** ("Dedicated-server rule" or "1 hour of measured writes" with the measured redo volume per hour). In the expandable "Per-connection and global buffers" you can override the buffers if needed (`sort_buffer_size`, `join_buffer_size`, `read_buffer_size`, `read_rnd_buffer_size`, `thread_stack`, `binlog_cache_size`, `net_buffer_length`, `tmp_table_size`, `max_heap_table_size`, `key_buffer_size`, `innodb_log_buffer_size`, `query_cache_size`, `aria_pagecache_buffer_size`, `temptable_max_ram` and "other"); empty means the server default.

The tool reproduces the servers' rounding rules:

- **MySQL 8.0/8.4 and MariaDB 10.5/10.6** round the buffer pool **up** to a multiple of `chunk_size × instances` (if that product is larger than the pool, the chunk size is lowered first). **MariaDB 10.11/11.x** no longer rounds to chunks but **down** to whole MiB.
- **Instances** exist only in MySQL (MariaDB has had a single pool since 10.5): below 1 GiB always 1; MySQL 8.0: 8; MySQL 8.4: min(pool ÷ (2 × chunk), CPU threads ÷ 4), 1 to 64 — at exactly 1 GiB the server uses 2 according to the tool, although the manual says 1.
- **Dedicated server** corresponds to `innodb_dedicated_server`: below 1 GiB of RAM 128 MiB, up to 4 GiB 50 %, above that 75 % (MySQL 8.4 counts whole GiB only). For MariaDB, which doesn't have this option, the MySQL 8.0 rule serves as a heuristic. On a server the database shares with PHP, the tool suggests 25–50 % as the usual starting point.
- **Redo log**: MySQL 8.4 dedicated = CPU threads ÷ 2 GiB (at most 16 GiB), MySQL 8.0 derived from the pool size; the measured variant sizes for one hour of peak load. A larger log means fewer forced checkpoints but a longer crash recovery.
- **Worst case** as in mysqltuner: global buffers (pool, key_buffer, innodb_log_buffer, query_cache, aria_pagecache) + max_connections × (sort + join + read + read_rnd + thread_stack + binlog_cache + net_buffer + min(tmp_table, max_heap)). On MySQL, `temptable_max_ram` caps the in-memory temp tables of all connections. Unlike mysqltuner, the tool includes `net_buffer_length`.

The output is a `[mysqld]` drop-in (on Debian e.g. `/etc/mysql/mysql.conf.d/zz-tuning.cnf`, for MariaDB `…/mariadb.conf.d/99-tuning.cnf`, on RHEL `/etc/my.cnf.d/tuning.cnf`) and a command that measures the redo write volume over 60 seconds of peak load. According to the tool, all rounding rules have been checked against real servers (MySQL 8.0 and 8.4, MariaDB 10.6, 10.11 and 11.8).

### nginx

Inputs: **worker_processes** (`auto` or a number), **worker_connections**, **Role** ("Reverse proxy / FastCGI" or "Static files only") and **worker_rlimit_nofile** (empty = 2 × worker_connections). Tiles: **Worker processes** (`auto` = CPU cores), **Max. clients** (workers × connections, halved for a proxy because every client needs a second connection to the upstream), **Open files / worker** and **LimitNOFILE**.

The output is the `nginx.conf` excerpt, a systemd override with `LimitNOFILE` (via `systemctl edit nginx`) and a command that reads the limit of a running worker from `/proc/<pid>/limits`. Warnings appear when `worker_rlimit_nofile` is below worker_connections (nginx then logs "worker_connections exceed open file resource limit"), leaves little headroom, is above 1,048,576 (then `fs.nr_open` has to be raised first), or when you enter more workers than cores.

### Apache httpd

Inputs: **MPM** (`event (+ PHP-FPM)` or `prefork (+ mod_php)`, set by the web stack), **Ø RSS**, **MaxConn./Child** (MaxConnectionsPerChild), **ServerLimit**, **ThreadsPerChild** and **Async factor** (AsyncRequestWorkerFactor).

- **prefork + mod_php:** `MaxRequestWorkers = floor(available ÷ Ø RSS)`; above 256, `ServerLimit` has to grow with it (hard limit 200,000).
- **event + PHP-FPM:** `MaxRequestWorkers = ServerLimit × ThreadsPerChild`; above 64 threads per child you need `ThreadLimit`. Memory is ServerLimit × Ø RSS of one child process (PHP runs in the FPM pool). Connections with all threads idle: (AsyncRequestWorkerFactor + 1) × MaxRequestWorkers. If Apache takes more than a quarter of the RAM, the tool points it out.

Apache corrects contradictory values at startup; according to the explanation, the warnings in the tool match the ones `httpd -t` prints. You also get an RSS measuring command and the MPM configuration block. On busy servers, ServerLimit should leave some room for processes still winding down after a reload.

## Availability

The tab "Availability & SLA" calculates availability in five sections.

### SLA → Allowed Downtime

From the **Availability target** (buttons from 99 % to 99.999 %) you get a table of allowed downtime per day, week, month, quarter and year — rounded, and exact in the **Exact** column. The year has 365.25 days; under **Month length** you choose between the average month (year ÷ 12 = 30.44 days) and the 30-day month (quarter = 90 days). A line below states the number of "nines". At 99.9 % that's 43 min 49.8 s in the average month and 8 h 45 min 57.6 s per year. Internally the tool works directly with the unavailability, so even 99.9999 % doesn't lose digits.

### Downtime → Availability

The reverse: **Downtime** (seconds to days) **per** day, week, month, quarter or year yields the **Availability** with its nines and the **Per year** value at the same rate. If the downtime is longer than the period, the tool reports 0 %.

### MTBF & MTTR

Availability = MTBF ÷ (MTBF + MTTR), both in hours. The tiles show **Availability** and **Downtime per year** with the number of failures per year. This is a steady-state value — it says nothing about how failures are distributed.

### Composite Availability

Tiers in series that every request passes through (**Add tier** adds more). Each tier has **Nodes n**, of which **Required k**, and a **Node availability %**; 2 nodes with 1 required are an active/passive pair, 3 with 2 required a quorum cluster. The default is Load balancer (1 of 1, 99.99 %) → Web servers (1 of 2, 99.9 %) → Database (primary + replica) (1 of 2, 99.95 %).

A tier fails when fewer than k of its n nodes are running: U = Σ_{i<k} C(n,i)·a^i·(1−a)^(n−i). Tiers in series multiply: A = Π (1 − U). The tiles show **Total availability**, **Downtime per year** (with a monthly figure) and the **Weakest tier** with its share of the downtime. The model assumes independent failures and instant failover — a shared power supply, network, deployments or a failover that doesn't work all make the real availability lower.

### Error Budget

From **SLO**, **Period** (days), **Elapsed** (days so far) and **Downtime so far** (minutes) you get **Budget**, **Used**, **Remaining** and **Burn rate** = (downtime ÷ elapsed time) ÷ (1 − SLO). At 1 the budget lasts exactly until the end of the period; at 2 it's used up halfway through. The explanation refers to Google's SRE Workbook, which alerts on fast burn (e.g. 14.4 over one hour for a 30-day budget).

## Backup

The tab "Backup Retention & Storage" tells you which snapshots your retention rules keep, how much space that costs, and whether the backup fits into the overnight window.

### Retention Rules

Under **Tool** you choose **restic**, **rustic** or **borg**. Presets fill in typical rules: `7 d · 4 w · 12 m · 3 y` (default), `24 h · 14 d · 8 w · 12 m`, `10 last · 7 d · 4 w · 6 m` and `30 d only`. The rule fields are **Last**, **Hourly**, **Daily**, **Weekly** (per ISO week), **Monthly**, **Quarter-yearly** and **Half-yearly** (rustic only) and **Yearly**, plus **Keep within** in hours, days, weeks, months or years ("everything newer than this"). Empty or 0 turns a rule off, −1 means unlimited. Each rule keeps the newest snapshot of a period, for that many periods that actually have snapshots — gaps don't count.

### Snapshots: simulate or paste

- **Simulate a schedule**: **Backup runs** every 1, 2, 3, 4, 6, 8 or 12 hours, daily, Monday to Friday, weekly (weekday selectable) or monthly (day of the month; shorter months use their last day), plus the time **At** and **Backups running for** (how long backups have been running, at most 30 years).
- **Paste snapshot list**: the output of `restic snapshots` (also `--json`), `rustic snapshots --json`, `borg list` (also `--json`) or simply one timestamp per line. Very long lists (over 12,000 characters) are kept until you reload, but they are not saved and not included in links.
- **Forget / prune runs on** — date and time of the `forget` or `prune` run; **Today** sets today's date.

### Kept Snapshots

The tiles show **Kept** (kept out of the total, number removed), **Oldest restore point** with its age, **Newest**, **Last 7 / 31 / 365 days** (restore points per period) and **Other tools keep** — how many snapshots the other two programs would keep with the same rules. A timeline marks the kept snapshots, and the table lists for each snapshot its ISO week, the rule(s) that keep it ("Kept by") and its age.

"How the tools decide (and where they differ)" describes the algorithms. All three walk from the newest to the oldest snapshot and keep the newest one of each hour, day, ISO week (Monday to Sunday), month or year until the count is used up. The differences:

- **restic** (ported from 0.16.4; according to the tool compared with `restic forget --dry-run --json` on 425 snapshots and 26 rule sets): rules overlap — one snapshot can count for daily, weekly and monthly at once. As long as a rule still has counts left, the oldest snapshot is kept too. `--keep-within` counts back from the newest snapshot in calendar months.
- **rustic** (ported from rustic_core's `forget.rs`, without a comparison against a rustic binary): like restic, but a week is "same calendar year and same ISO week number" — the days of ISO week 1 that fall into December form a week of their own. It also adds the quarter-yearly and half-yearly rules. `--keep-within` counts forward from each snapshot with the day clamped (31 January + 1 month = 28/29 February).
- **borg** (ported from `prune_split` in borg 1.4, compared with borg's own Python code on 405 cases): rules do **not** overlap — a snapshot already kept by `--keep-daily` doesn't count for `--keep-weekly`. So 7 daily + 4 weekly keep up to 11. If a rule can't reach its count, it keeps the oldest archive. `--keep-within` counts from now, with 1 month = 31 days and 1 year = 365 days.

Simulated times are wall-clock times in a time zone without daylight-saving changes. For pasted lists with a UTC offset, a `--keep-within` limit that crosses a daylight-saving change can be off by one hour — the tool explains this case in the text.

### Commands

For all three programs the commands with your rules are ready to go, each starting with a dry run: `restic -r /srv/restic-repo forget --dry-run …` and then with `--prune`, `rustic -r /srv/rustic-repo --dry-run forget …` and `… forget … --prune`, and for borg 1.2/1.4 `borg prune --dry-run --list …`, `borg prune --list …` and `borg compact`. The repository paths are placeholders. "Notes on the flags" explains: restic and rustic apply the rules per group of host and paths (`--group-by host,paths`); "unlimited" is `unlimited` in restic and `-1` in rustic and borg; the `--keep-within` notations differ (restic `y`/`m`/`d`/`h` without weeks, rustic `mo` for month and `m` for minute, borg a number with `H`/`d`/`w`/`m`/`y`); borg prunes the whole repository unless you narrow it down with `-a 'host-*'`, and since 1.2 only frees space with `borg compact`.

### Storage Estimate

Inputs: **Source data** (GB, TB, GiB, TiB), **Changes per day** (%), **Compression** (a ratio, e.g. 1.5 : 1 = two thirds of the size; 1 for data that is already compressed), **Full backup every** (days) and **Restore window** (days). The table compares six strategies by **Restore points**, **Storage** and **× source**:

- **Full backups only**, **Full + incremental**, **Full + differential** and **Deduplicated** — each with one backup per day across the restore window.
- **Deduplicated, kept snapshots** and **Full copies of the kept snapshots** — with the snapshots the retention simulation above keeps.

The assumption: every day a random share c of the data is overwritten; between two backups g days apart the changed share is 1 − (1 − c)^g. Deduplicated: S · (1 + Σ (1 − (1 − c)^g)) over the gaps between the kept snapshots. With full + incremental, a chain can only go once its last day has dropped out of the window (the tool calculates the worst moment before that); with full + differential, old differentials drop out day by day. All values apply after cleanup; while a backup is running it needs the space of one more. Real data tends to change in the same places and grows more slowly; growth of the source itself is not included.

### Backup Window

With **Throughput**, **Nightly window** (hours) and the question of what limits — "the upload — compressed data (offsite, cloud)" or "reading the source — uncompressed data (local disk)" — the tool calculates **First backup** (the whole source), **Daily backup** (changed data) and the rate the daily backup would need to fit the window. Compression only counts when the link is the bottleneck (all three programs compress before sending). Not included are scanning unchanged files (fast with an intact cache, slow after losing it), lots of small files, and protocol overhead.

### 3-2-1-1-0 Check

Inputs: **Copies in total** (including the original), **Media types**, **Offsite copies**, **Offline / immutable**, **Last restore test** (never, over a year ago, within a year, within three months) and the switch for regular `check` runs. The tool checks five rules — 3 copies, 2 media types, 1 offsite, 1 offline or immutable, 0 errors — and awards "3-2-1-1-0 met", "3-2-1 met" or "At risk". The zero-errors rule only counts as met if the last restore test was no more than three months ago **and** `check` runs regularly. Immutable means things like Object Lock/WORM, an append-only borg repository or a rotated, unplugged USB drive. The tool's verdict: "A backup that was never restored is a hope, not a backup."

## SSD & UPS

### SSD Endurance

Inputs: **Capacity**, **Warranty** (years), **Endurance rating (datasheet)** as **TBW** or **DWPD**, **Your writes** (GB/day, TB/day or average MB/s) and **Extra write amplification**. The tool calculates TBW = DWPD × capacity × 365 × warranty years (and vice versa), and from that **Years until TBW** = TBW ÷ (writes per day × WAF × 365) as well as the write volume that lasts exactly until the end of the warranty.

The WAF factor matters: the TBW rating refers to host writes under the vendor's test workload (JEDEC JESD219, client or enterprise), whose own write amplification is already priced in. The factor in the tool is therefore **relative** to that test workload — 1 means "like the test". You only raise it for workloads that wear the flash harder, such as lots of small random or synchronous writes on a client SSD. And: TBW is a warranty limit, not the point at which the SSD dies.

### SMART → Data Written & Wear

Optionally you paste the output of `smartctl` or `nvme smart-log` and click **Read values** — the text is read in the browser only and not saved. Otherwise you enter the values by hand:

- **NVMe**: **Data Units Written**, optionally **Data Units Read** and **Percentage Used**. One data unit is always 1000 × 512 = 512,000 bytes, regardless of the LBA format.
- **SATA / SAS-SATA**: **Write counter (RAW_VALUE)**, the **Attribute** type (`Total_LBAs_Written` in sectors, `Host_Writes_32MiB`, `…_Writes_MiB` or `…_Writes_GiB`) and the **Logical sector size** (512 or 4096 bytes, as "Sector Size" in `smartctl -i`).
- **Power-on hours** (optional) for rates and remaining life.

Results include the amount of data written (and read), the share of the TBW from the section above that's been used, the average write volume per power-on day, and estimates until the TBW or until 100 % "Percentage Used". **Use this rate as “Your writes”** carries the measured rate over into the lifetime calculation. "Per day" means days of **power-on time** — a machine that's off at night needs more calendar days for the same hours. For the **Device** you enter, the tool generates the matching commands: `smartctl -a`, `nvme smart-log` and `smartctl -j -a` for NVMe; `smartctl -i -A`, the USB variant with `-d sat` and a loop over all `/dev/sd?` for SATA.

### UPS Sizing

In the device list you enter **Device**, **Watts** and **Qty** (**Add device** for more rows); the **Total load** appears below. The tool recommends measured values (power meter, PDU, `ipmitool dcmi power reading`) — PSU labels state the maximum, not the actual draw.

For the UPS you set the **UPS rating (VA)**, the real power either in **Watts** or as a **UPS power factor**, the **Load power factor**, **Max. load** (default 80 %) and the mains voltage **Mains** (230, 240, 120 or 100 V). A UPS has two limits, apparent power (VA) and real power (W); the load VA is watts ÷ the load's power factor, and the load share is the larger of the two ratios. For servers and PCs with active PFC (power factor 0.95–0.99), the watt rating is usually the limit. Staying below 80 % leaves room for inrush currents and growth, and extends the runtime. The current is load VA ÷ mains voltage, without the UPS's charging current and losses.

The tiles: **Load** (watts and VA), **UPS load** (share, with the limiting quantity W or VA), **Headroom** or **Over the limit** (how many watts you can still add before the load limit, or have to remove), **Recommended rating** (watts and VA needed for your load at the chosen limit) and **Mains current**.

### Battery Runtime (estimate)

This section takes its load from the **UPS Sizing** device list. Inputs: **Battery type** (lead AGM/VRLA k ≈ 1.15, gel 1.2, flooded 1.25, LiFePO4 1.05 or a custom exponent), **Peukert k**, **Battery** (volts), **Capacity** (Ah), **Batteries** (count), **Rated at** (rated discharge time in hours, usually 20 h for lead-acid), **Inverter eff.**, **Usable DoD** and **Health**.

The tiles show **Estimated runtime** (if health is above 80 %, also the value at 80 %), **Without Peukert**, **Usable capacity** (usable share of the rated Ah at this current) and **Battery power** with the current per battery. A table adds the runtime with and without Peukert for the current load and for 25, 50, 75 and 100 % of the UPS's watt rating. Via **Target runtime** (minutes) the tool works out how many Ah each battery would need for that runtime (**Needed per battery**) and tells you whether the existing ones are enough.

The formula: battery power P = load ÷ inverter efficiency, current per battery I = (P ÷ count) ÷ voltage, Peukert t = H × (C ÷ (I × H))^k, runtime = t × DoD × health; "Without Peukert" = V × Ah × count × DoD × health ÷ P. Below the rated current the tool caps at the rated capacity. Because a UPS discharges in minutes, far from the 20-hour calibration, the result is an extrapolation — and the tool says so plainly: the manufacturer's runtime chart beats this calculation. Lead-acid batteries count as worn out at about 80 % health (typically after 3–5 years in a UPS).

### Power, Cost & Heat

**Power draw** (or, via checkbox, **Use the UPS load total**), **Hours per day**, **UPS efficiency** (100 % = no UPS; line-interactive about 95–98 %, online 88–96 %), **Electricity price** and **Currency** give you **Wall power**, **Energy per year**, **Cost per year**, the UPS losses and **Heat** in BTU/h. Formulas: wall power = W ÷ UPS efficiency, kWh per year = wall power × hours × 365 ÷ 1000, heat = wall power × 3.412142 BTU/h — practically all electrical power ends up as heat in the room, UPS losses included. Enter an average draw, not a peak.

## Architecture, privacy and limits

- **Purely client-side:** all calculations run as JavaScript in the browser. There's no server endpoint, no API and no telemetry; the PHP page only renders the tab frame. Each tab consists of a DOM-free calculation core and a thin UI layer — an error in one tab doesn't take the others down.
- **Storage:** inputs are kept per tab in your browser's local storage. If it's unavailable (e.g. with site data blocked), the tool still works, it just doesn't remember anything. Pasted raw data stays out: the `ls -la` listing and the `smartctl` output are never saved, and neither are 95th-percentile samples over 8,000 characters or snapshot lists over 12,000 characters.
- **Share links contain your inputs:** everything you type into a tab — device names, paths, pool names — is encoded in the link from **Copy link**. Values from someone else's link are validated like any untrusted input (select options only from allowed values, numbers clamped, text truncated).
- **Models, not measurements:** performance figures, URE risks, battery runtimes and storage estimates are explicitly models with their assumptions laid open. Where a real program exists, its behavior is what counts — and before you run any command, so is your own check.
- **Deliberately not included:** subnet calculation, cron, SSH commands, Docker and time zones have their own tools (see the [overview](https://www.jpkc.com/db/en/tools/sysadmin/)); SysAdmin Tools doesn't calculate ZFS dRAID, Ceph/erasure coding or ACLs (`setfacl`).

To get started, see the [overview page](https://www.jpkc.com/db/en/tools/sysadmin/); worked walkthroughs are in the [examples](https://www.jpkc.com/db/en/tools/sysadmin/examples/), strategy and pitfalls in the [tips & tricks](https://www.jpkc.com/db/en/tools/sysadmin/tips/). You can try everything right in the [tool](https://www.jpkc.com/tools/sysadmin/).

