"v1.8.x appended 70,000 records in 5 minutes; now it's much slower" (Pritpal Bedi). Bisected to v1.09.13 (760ad3d): the reworked append/commit flow made every appended record pay three B-tree mutations instead of one (eager blank-key insert + erase), a redundant second physical writeback, and a guaranteed-miss blank erase before every first insert. Measured −39% on remote appends with an active CDX (~1050 → ~640 rec/s). With no active index there was never a regression (~3000 rec/s).
The fix keeps all of 760ad3d's correctness (the blank-key test pins
it): no eager keying on append, the fresh-append erase is skipped when
the view provably never saw the recno, and a bare append is keyed
exactly once at write time by the new Table::commit_bare_append()
with no double writeback. The ~40-case intensive index battery passes
unchanged; the bench is back to ~1000 rec/s (v1.09.12 parity).
Every phrase now has a single canonical form on the command line, in
openads.ini, and in env variables: underscore.
openads.ini: a-inside a key folds to_(error-log-max==error_log_max), so old dash-style files keep working — but the canonical form shown everywhere is underscore.- Command line: the same fold after
--, so--max_sessions==--max-sessions,--http_port==--http-port,--enable_file_func==--enable-file-func, etc.--helpnow documents the underscore forms, matching the OPENADS_* env vars. openads.ini.sampleships in canonical underscore notation.
The server's session cap (default 500 concurrent connections, from
OPENADS_SERVER_MAX_SESSIONS since v1.4.0) had no ini key or CLI
flag — deployments needing more concurrent clients (e.g. the B_BIG
700-instance stress) had to set an environment variable by hand. Worse,
the backlog ini key and --backlog CLI flag were parsed and printed
on the startup banner but never actually reached listen() — only
the env/default applied. Both are now real:
--max_sessions NCLI flag andmax_sessions = Nini key (dash spelling accepted,0= unlimited). Default is unchanged:OPENADS_SERVER_MAX_SESSIONSenv, else 500. Connections beyond the cap are refused and counted (rejected_sessionscounter, visible in the Studio Sessions panel).Server::set_backlog(n)wired through:--backlog/ inibacklognow sets the TCP accept queue for the primary and every extra[port:NNNN]listener. Default remains envOPENADS_SERVER_BACKLOG, else 256.openads.ini.samplerewritten from scratch: every server and client key with its default value and an explanation, the precedence rules (env > CLI > ini > built-in), multi-port sections, and the full server-side env-var surface (OPENADS_SERVER_*).
max_sessions = 1000 ; instances + headroom (0 = unlimited)
backlog = 256 ; absorb the connect burst- Full suite: 1520/1520 test cases, 573,277 assertions, 0 failures (Windows x64, Release).
- Remote create/index/append storm at 700 concurrent connections (the B_BIG staging dance: create → 3 CDX tags → shared open → 10 appends each, then physical DBF+CDX validation): 7/7 clean runs.
- Regression bench: remote appends with active CDX restored to ~1000 rec/s (v1.09.12 parity, was ~640 since v1.09.13).
- New
parse_inicases: canonical underscore keys, dash aliases fold to the same field,max_sessionswith0=unlimited, rejection of garbage.
- No file-format or wire-protocol changes; drop-in replacement for v1.09.x serverd and ace32/ace64.
- If you serve more than ~500 simultaneous clients, add
max_sessions = 1000(or your number) to youropenads.ini— otherwise the cap stays at 500 exactly as before. --backlognow has a real effect; if you previously set an oddbacklogvalue in openads.ini believing it inert, re-check it.- Dash-style CLI flags and ini keys still work, but prefer the underscore spellings — that is what the help text and samples show.
- Copy the new
openads.ini.samplenext toopenads_serverd.exeasopenads.ini, setmax_sessions = 1000, restart the daemon. - Run B_BIG with 700 instances: instances losing the create race get a clean 7040 and proceed; final record count should be exactly 10 × instances (100 each — verified byte-perfect on our 700-instance table).
- If anything still misbehaves, report the stage (connect / DbCreate / INDEX ON / append) and the instance numbers from the window titles.