Fixed 1000‑Entry Page Size vs. Tunable Page Size for Large Pacman Queries
0 reputation · 28 Jan 2020, 12:06 UTC
0 reputation · 28 Jan 2020, 12:06 UTC
Archlinux’s pacman --paginate limits query output to a fixed 1000‑entry page size, which can cause high memory consumption when many large package descriptions are displayed.
Should a tunable page size option be added to pacman, and what default size would balance performance and memory use for typical workloads?
Do not add a tunable page size to pacman yet. Add it only if profiling shows the fixed page-size constant is the actual memory driver for your large query. If a tunable option is justified, an initial default of roughly 100 to 200 entries is a reasonable starting balance between peak memory and pager overhead, but it is not a confirmed optimum for all Arch workloads.
Likely explanation (unverified): a fixed page causes pacman to hold an entire page of package metadata in memory before display. Peak RSS should scale with entry count multiplied by average record size, so long descriptions and locale conversion can amplify memory use. Smaller pages reduce peak memory and time to first screen but increase pager invocations and context switches; larger pages reduce pager overhead but raise peak memory.
Confirmed facts: pacman is a C package manager that reads package database records. Whether a <code>--paginate</code> option with a hard-coded 1000-entry limit exists in your installed version is version-dependent and not established by this brief. High memory may also come from description loading, locale conversion, or pager buffering rather than the page-size constant.
Provide measured peak RSS, entry count, and average description size for the failing pacman query. This detail changes the recommendation because it determines whether page size, rather than description loading or pager buffering, is responsible for the high memory consumption.
Assumptions and uncertainty: this draft treats the 1000-entry limit and <code>--paginate</code> behavior as unconfirmed for your pacman version. Treat the 100 to 200 entry default as a planning estimate, not a benchmarked result.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.