{"version":"2.1.269","anchor":"sdk-child-process-memory-sampling-made-async-and-page-size-d","canonical_anchor":"sdk-child-process-memory-sampling-made-async-and-page-size-d","heading":"SDK child-process memory sampling made async and page-size detection reworked","tier":"internal","area":"SDK","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.269\/e\/sdk-child-process-memory-sampling-made-async-and-page-size-d","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.269","markdown":"### SDK child-process memory sampling made async and page-size detection reworked\n\nSDK memory usage sampling for child processes now runs asynchronously and in parallel\n\n**What**\n\nThe SDK's memory-usage tracker, which feeds the `tengu_sdk_memory_summary` telemetry event, now reads each child process's memory stats from `\/proc\/<pid>\/statm` asynchronously and in parallel for all child processes, using `Promise.all`, instead of reading them one at a time synchronously. It also computes the operating system's memory page size by rounding the ratio of resident set size to page count to the nearest power of 2, instead of doing a plain division with a fallback value of 4096.\n\n**Why**\n\nReading memory stats in parallel rather than one-by-one should make this telemetry collection faster and less likely to block, and the improved page-size calculation should make the resulting memory measurements more accurate.\n\n- Area: SDK\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5"}