Documentation

6.15 Dataset limits, memory and performance

nlmx 4.3.0 does not declare a small fixed maximum number of rows or subjects in the dataset reader. Practical limits come from memory, model cost, output volume and the algorithms used by a command.

Memory model

The control-stream reader loads the text, splits it into lines, parses every retained record and stores subjects with record vectors. Each record contains its model-visible numeric vector plus reserved fields. Declared screening covariates additionally store per-record arrays. Memory therefore grows approximately with:

retained rows × ($INPUT width + declared covariates + record overhead)

Text and parsing allocations can temporarily add to the final dataset size. A wide dataset can cost more than a much longer narrow one. Columns beyond $INPUT are ignored for the model record, but the source text is still read.

Standalone QC/EDA commands have their own table representations and can generate large reports, subject tables and plot files. Simulation commands multiply work by replicates and may write profiles. Disk output can become the practical constraint before parsing.

Parallelism

Many later calculations parallelise over independent subjects or replicates. Dataset parsing itself is primarily a deterministic preparation stage. Increasing --threads does not make every stage faster. Chapter 9 will define thread determinism and benchmarking; command chapters will identify their parallel unit.

No invented “largest tested” claim

The source does not establish a universal largest validated dataset, and this documentation pass did not run a controlled scaling study across hardware. Therefore the book does not claim a maximum. A local successful run is evidence for that file and environment, not a supported ceiling.

For a release performance statement, benchmark a matrix of row counts, widths, subjects and event complexity. Record peak resident memory, parse time, analysis time, output size, hardware, filesystem, build profile and executable hash. Include failure behavior near memory pressure.

Performance without semantic shortcuts

Speed comparisons must retain the same records and event semantics. Replacing explicit doses with ADDL, dropping BLQ rows, removing time-varying covariates or reducing output can improve runtime while changing the work. Report preparation, estimation and reporting time separately.

Common mistakes

  • Treating usize indexing as a practical capacity guarantee.
  • Benchmarking only row count and ignoring width or events.
  • Attributing total runtime to the model engine when report generation dominates.
  • Comparing different retained row sets.
  • Publishing a “maximum dataset” from one machine and command.

Checklist

  • Rows, columns, subjects and event counts are all reported.
  • Peak memory and output size are measured.
  • Hardware, threads, build and executable hash are retained.
  • Parsing, analysis and reporting time are separated.
  • Compared programs perform the same data work.

Further reading

Chapter 9 will define reproducible performance experiments. Chapters 20, 24, 27, 28 and 31 will document the scaling dimensions of fitting, posterior resampling, VPC, simulation and power.