SysAdmin Tools — Tips & Tricks

Strategy and pitfalls for SysAdmin Tools: reading URE risk, RAIDZ padding, chmod on directories, sysctl, PHP-FPM, OPcache, restic vs. borg, SSD TBW.

Back to the overview: SysAdmin Tools · Open the tool: www.jpkc.com/tools/sysadmin/

SysAdmin Tools gives you numbers with their derivation — the decision is still yours. This page collects how to read the results, where the typical traps are, and which tools pair well with it. The basics of each tab are in the manual.

It pays to expand the formulas

Almost every result has an expandable section with formulas and assumptions underneath. Read it before you put a number into a design document or a quote: it tells you whether a value is a hard rule of the program (such as how the InnoDB buffer pool is rounded), a Heuristic (such as the PHP-FPM spare servers), or a model with upper-bound character (such as RAID performance). With heuristics, your own measurements always win — the tool accepts them in every field.

Generated commands: check first, then run

The RAID commands wipe the drives involved. That's why the tool puts the warning at the top of the script and fills in missing device names with the placeholder /dev/disk/by-id/DISK-01 — names that normally don't exist on a real system, so a command pasted by accident is more likely to fail than to hit the wrong disk. Replace the placeholders with paths from ls -l /dev/disk/by-id/ and cross-check them with lsblk -o NAME,SIZE,MODEL,SERIAL. Names like /dev/sdb can change between boots; with ZFS you'd be tying yourself to an order that may no longer exist after the next reboot.

The same principle applies to backups in a gentler form: every command block starts with the --dry-run line. Run it, read the list of snapshots that would be deleted, and only then run the real forget or prune.

URE risk: an upper bound, not a forecast

For six 8 TB HDDs in RAID 5, the RAID & Storage tab reports a URE risk of around 96 % for the rebuild. That sounds like certain data loss — but it isn't. URE classes (10^14, 10^15 …) are datasheet upper bounds of the "less than one error per …" kind, not measurements; in practice, a full read of a 10^14 drive normally succeeds. The tool says so itself in the explanation below the tiles.

What you should still take from the number: the difference between layouts with and without remaining redundancy is huge. RAID 6 or RAIDZ2 show "≈ 0" because one parity is left after a failure. The After 2 failures tile then shows the scenario that really hurts. And keep the other direction in mind: drive failures cluster (same batch, same age, rebuild stress), so the "Another drive fails" values are more of a lower bound. Thanks to checksums, ZFS and Btrfs report a read error as one damaged file; md may abort the rebuild. Either way, RAID remains an availability concept, not a backup concept.

Mixed drives: order and system decide

The tool assigns drives to mirrors, RAID 50/60 groups and ZFS vdevs in list order. If you mix sizes, put drives of the same size in the same row or directly after one another; otherwise a small drive ends up in a vdev with large ones and drags down its capacity. The Drive usage table shows you straight away where space is going to waste.

As a general rule, classic RAID and ZFS count every member at the size of the smallest drive in its group. Btrfs, Synology SHR and Unraid make use of mixed sizes — each at its own price: SHR and Unraid read a lot without redundancy during a rebuild, Unraid only delivers the speed of a single drive, and Btrfs raid5/raid6 is explicitly not meant for production because of the write hole. A look at Layout Comparison with Show impossible layouts switched on also tells you which layouts one more drive would unlock. A worked example is in the examples.

ZFS: vdev width, padding and fill level

  • Watch out for RAIDZ padding. RAIDZ pads every allocation to a multiple of parity + 1 sectors. A 7-drive RAIDZ2 with 128K records and ashift=12 therefore stores only 66.7 % data instead of the nominal 71.4 %, while a 6-drive RAIDZ2 stores exactly the nominal 66.7 %. The tool reports the deviation whenever there is one — try out different values for Drives per vdev.
  • Small blocks cost more. The line for a 4 KiB block shows how much space small files, metadata or zvols with a small block size waste in RAIDZ. For VMs and databases with small blocks, mirror vdevs are often the better choice — according to the tool they also deliver the best random I/O in ZFS.
  • Wide vdevs resilver slowly. For vdevs wider than about 12 drives, the tool points out that several narrower vdevs are the usual approach.
  • Stay below 80 %. The usable capacity is the ceiling, not the planning figure: beyond roughly 80 % full, ZFS slows down due to fragmentation. So plan your needs against 80 % of Usable.

TB, TiB and the "3.7T" from df -h

A 4 TB drive has 4 × 10^12 bytes, but df -h and ls -lh calculate in powers of two, print only the letter — and round up: instead of 3.64 TiB you see "3.7T". So when you compare capacities, don't hold df -h values against vendor figures; use df -H (decimal) or the unit converter in the Transfer tab. On top of that comes what the file system takes for itself — with ext4, a default 5 % reserve for root, which you can shrink with tune2fs -m on pure data drives. More on both commands in the df & du cheat sheet.

chmod on directories: setgid sticks

The biggest surprise in the Permissions tab: GNU chmod 755 dir does not clear a set setgid bit on a directory. chmod 0755 dir and chmod u=rwx,g=rx,o=rx dir leave it in place too. Only g-s, -s, five digits (chmod 00755 dir) or =755 remove it. That's why the tool writes five-digit modes for directories and appends ,-s to the symbolic form — so you get exactly the mode you see. Other implementations (BSD, BusyBox) may behave differently; the tool models GNU coreutils.

More tricks from the Apply a chmod Expression simulator:

  • The umask filters more quietly than you'd think. Without u/g/o/a before the operator, the umask applies: under 022, chmod -w file removes only the owner's w, not the group's. If you want to hit every class, write a-w. The umask filtered tile makes the effect visible.
  • Capital X instead of x for trees. chmod -R u=rwX,g=rX,o=rX makes directories enterable without making every data file executable. The tool offers this form when it fits your tree modes; otherwise it sticks to the two find commands.
  • chmod -R 777 fixes nothing. The tool warns about every world-writable tree. Almost always the real problem is the wrong owner or group — set them with chown/chgrp and give the group write access.
  • chown first, then chmod. Changing the owner or group clears setuid/setgid on files; the tool reminds you as soon as a file carries these bits.

A complete recipe for a team directory with setgid is in the examples, and the key chmod options are in the chmod cheat sheet.

umask: set it in the right place

A umask set in the shell only applies to that shell. For services it belongs in the systemd unit (UMask= in the [Service] section), for logins in /etc/login.defs — exactly the three variants the "Set it" block provides. Keep in mind that a default ACL on the parent directory replaces the umask for new entries; if ls -l shows a + after the mode, check with getfacl what really applies. And: the umask only takes rights away. New files not getting an x is down to the program creating them with 0666, not the umask.

Transfer: the line is rarely the bottleneck

The transfer time in the Transfer tab is the lower bound the line allows. In practice, something else often slows you down: an HDD that collapses under random access, an SSD once its SLC cache is full, the CPU doing encryption or compression, or the far end. Link Comparison helps put this in perspective — for peripherals like USB or SATA it gives typical guide values marked with ≈.

  • 95th percentile per direction. Carriers usually bill the higher of inbound and outbound traffic. So paste each direction separately and compare the results. The tool lists unknown units instead of silently reading them as Mbit/s — glance at the skipped lines.
  • Export samples without thousands separators. On Decimal mark = Auto, a single comma counts as a decimal mark, so a sample of 1,234 Mbit/s is read as 1.234 Mbit/s, not 1234. With the mark set to . (point), a comma separates columns instead, and the same line yields 234. Plain numbers like 1234 are read correctly either way.
  • Check the month length. Whether your provider bills by 30 days or the average month makes a difference of about 1.5 % under sustained load; the tool offers both.
  • Average isn't peak. The monthly traffic figure assumes a sustained rate around the clock. The peak of real daily curves sits several times higher.

sysctl buffers: only raise, never lower

The snippet from Bandwidth-Delay Product & TCP Window is deliberately defensive: it only raises maximums, never sets tcp_rmem below the 32 MiB that has been the default since Linux 6.16, and writes nothing at all if the defaults are enough. If instead you copy fixed values from an older tuning guide, a maximum below 32 MiB can actually lower the default on a current kernel. So before you apply anything, read the current values with the check command and keep any maximum that's already larger.

At high latency, the TCP window often limits a single stream: with a 4 MiB window, a connection over a 90 ms round trip manages only about 373 Mbit/s according to the tool. Instead of only tweaking buffers, parallel streams help too (rclone --transfers, iperf3 -P) — they multiply every limit. With packet loss, the Mathis tile shows how much even a little loss drags down throughput.

PHP-FPM: measure under load, and more isn't always better

  • Measure RSS under real load. Idle workers are much smaller than busy ones. The measuring command in the tool only captures the workers (not the master). Because RSS counts the shared OPcache in every worker, the result errs on the safe side; the PSS variant is closer to the truth if you need to calculate tightly.
  • max_children is a ceiling. More workers than CPU threads only help as long as requests are waiting on the database or APIs. If your PHP code mostly crunches on its own, extra workers gain you nothing.
  • Take the worst case seriously, but not literally. memory_limit × workers is the case where every request hits the limit at once. If the tool shows a warning here, that's a reason to set memory_limit realistically rather than generously.
  • Lock down the status page. The generated pool section sets pm.status_path = /fpm-status so you can keep an eye on "server reached pm.max_children". If you pass this path through to PHP-FPM in your web server, only allow it for internal addresses.
  • Respect the spare values. php-fpm won't start if min_spare ≤ start ≤ max_spare ≤ max_children is violated. The tool checks the condition, with php-fpm's own messages, before you reload.

OPcache: limits PHP doesn't forgive

PHP only accepts opcache.max_accelerated_files between 200 and 1,000,000. A value outside that range isn't clamped but rejected — and then the default of 10,000 with 16,229 hash slots silently applies. The interned strings buffer is just as treacherous: it's carved out of memory_consumption, and if it's just as large, OPcache won't start at all. The tool keeps the file count within the allowed range and reports an oversized interned strings buffer as an error.

Check the effect with opcache_get_status() from a web request — the CLI has its own cache and tells you nothing about PHP-FPM. If oom_restarts and hash_restarts stay at 0, the size is right. And if you pick Never check (validate_timestamps = 0), every deployment has to clear the cache, or the old files keep running.

MySQL/MariaDB: the servers' rules, not a rule of thumb

The buffer pool size you enter isn't necessarily the one the server uses: MySQL and MariaDB 10.5/10.6 round up to chunk multiples, MariaDB from 10.11 down to whole MiB. The Buffer pool tile shows the effective value. If the database shares the server with PHP, "Dedicated database server" mode with 75 % of the RAM is the wrong choice — take a share instead (the tool suggests 25–50 % as a starting point) and leave the switch in the memory plan on, so PHP-FPM only gets what's left. The mysqltuner-style worst case is a theoretical maximum that servers rarely reach — and if one does, the OOM killer picks the largest process.

SLA: the weakest tier counts

In Composite Availability, the Weakest tier tile shows which tier causes most of the downtime. With the default (a single load balancer at 99.99 %, two web servers, a database with a replica), total availability comes to 99.9899 %, about 53 minutes of downtime per year — and almost all of it goes to the single load balancer. So redundancy in the other tiers buys you very little as long as there's a single point of failure at the front. But don't let the model flatter you: it assumes independent failures and instant failover; a shared power supply, a bad deployment on every node or a hanging failover aren't in it.

When reviewing contracts, also check the month definition: 99.9 % allows 43 min 49.8 s in the average month but 43 min 12 s in the 30-day month. For day-to-day operations, the error budget's Burn rate is the more useful number — if it stays above 1, the budget runs out before the end of the period.

restic, rustic and borg are not interchangeable

The same --keep-* flags don't mean the same thing in the three programs — the Other tools keep tile shows it at a glance:

  • borg doesn't overlap. A snapshot kept by --keep-daily doesn't count for --keep-weekly in borg. With 7 d · 4 w · 12 m · 3 y, borg therefore keeps more than restic. If you switch programs, recalculate your rules.
  • rustic counts weeks differently. In rustic, a week is "same calendar year and same ISO week number". Around the turn of the year, that can make a difference: with the preset and daily backups, on the run date 15 January 2027 restic keeps 21 snapshots according to the simulation and rustic 20, because rustic counts the last days of December as a week of their own.
  • --keep-within is calculated differently. restic counts back from the newest snapshot in calendar months, rustic forward from each snapshot with the day clamped, borg from now with 31-day months and 365-day years. The notation differs too (m is a minute in rustic).
  • Mind the groups. restic and rustic apply the rules per host and path; borg prunes the whole repository unless you narrow it with -a 'host-*' — and only frees space with borg compact.

If you want to see the real situation rather than a simulation, paste the output of restic snapshots --json or borg list --json under Paste snapshot list. The flags of all three programs are summarized in the cheat sheets for restic, rustic and BorgBackup.

A backup only counts once you've restored it

The 3-2-1-1-0 Check only awards the last rule — "0 errors" — if check runs regularly and the last restore test was no more than three months ago. That's strict, but right: a backup that's never been tested is, in the tool's words, "a hope, not a backup". The second-to-last rule, an offline or immutable copy, protects you against ransomware and against your own typo with admin rights. The storage estimate helps you weigh what an extra copy costs — it assumes randomly distributed changes, so for real data, which tends to change in the same places, it's more likely to overestimate.

SSD lifetime: TBW is a warranty limit

TBW tells you how far the vendor's warranty goes, not when the SSD will fail. Keep an eye on the SMART values rather than the calendar. Three traps when reading them:

  • NVMe units. A "Data Unit" is always 512,000 bytes (1000 × 512), whatever LBA format the SSD uses. smartctl prints the converted value in brackets after it.
  • SATA attributes. Total_LBAs_Written counts sectors — multiply by the logical sector size from smartctl -i. Some vendors count in 32 MiB or GiB; the attribute name gives it away. With Unknown_Attribute, only the vendor's documentation helps.
  • JSON output. In smartctl -j, raw.value is the complete 48-bit raw field, which for some attributes holds more than the counter. The tool's reader therefore uses the text form of the raw value — when in doubt, paste the whole output instead of copying individual numbers.

The Extra write amplification factor is relative to the vendor's test workload, whose write amplification is already included in the TBW. Leave it at 1 unless your workload is clearly harsher (lots of small synchronous writes on a client SSD). And note that "per day" for SMART values means days of power-on time.

UPS: measure, check the watts, trust the vendor's curve

Enter measured power draw, not PSU labels — those state the maximum. With devices that have active PFC, it's almost always the UPS's watt rating that limits you, not the VA figure; a 1500 VA UPS rated at 900 W carries just 900 W. The 80 % limit leaves room for inrush currents and extends runtime.

The battery runtime is a Peukert extrapolation: a UPS discharges in minutes, while the rated capacity usually applies to 20 hours. Use the estimate to compare options; for planning, the vendor's runtime chart counts — along with a real discharge test. The Estimated runtime tile also shows the value at 80 % battery health; that's roughly where lead-acid batteries count as worn out, typically after three to five years in a UPS.

Copy link packs all of the current tab's inputs into the address — including device names, paths, pool names and prices. That's handy for agreeing on a calculation with colleagues or attaching it to a ticket. But think for a moment about whether serial numbers from /dev/disk/by-id/ paths or internal directory names belong in a public ticket. Raw data such as ls -la listings, smartctl output and long sample series never end up in the link anyway.

Combining with other JPKCom tools

  • Cron Job Helper — turn the schedule from the Backup tab into a cron expression, including the forget/prune run.
  • SSH Proxy — tunnels to the backup target or to the database you sized in the tuning tab.
  • IP Tools — subnets and address ranges for the networks your backups and migrations run over.
  • Docker/Podman Composer — for when nginx, PHP-FPM or MySQL run in containers; the tuning values apply there just the same.
  • Time Converter — line up snapshot timestamps and time zones before you paste a list with UTC offsets.

For looking up the commands the tool generates: the cheat sheets for lsblk, nginx and find.


The full feature reference is in the manual, worked walkthroughs in the examples. You can try everything right in the tool.