Skip to content

Explicit chunk size to fit memory usage under 64 GB - #31

Merged
i-am-sijia merged 4 commits into
CTPSSTAFF:mainfrom
wsp-sag:laptop-memory-simple
Oct 5, 2026
Merged

i-am-sijia merged 4 commits into
CTPSSTAFF:mainfrom
wsp-sag:laptop-memory-simple

Conversation

@i-am-sijia

@i-am-sijia i-am-sijia commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

This PR does the following:

  1. Inherited the explicit_chunk size from Bound full-population memory use and repair benchmark qualification #29, which are saved in the model\configs_explicit_chunk folder
  2. Tuned up the num_processes for multiprocessing from 4 to 16, based on CTPS machine spec (24 processors in total)
  3. Enabled and tested the summarize step under multiprocessing, previously it was commented out

@mmilkovits @jpn-- @mnbina The time series chart below shows the memory usage of a full-size model run without the summarize step, using MA/RI/NH population (3.6M households), running with 16 processors, sharrow turned on and pre-compiled. The machine uses 23 GB RAM when idle. During the run, the machine memory peaked at 75 GB, meaning the max memory used by the lighthouse was about 52 GB. Total run time was 250 minutes. This run was conducted on a WSP machine.

sys_usage_mp16_sharrow_sha25044e8_memory_timeseries

Update:
summarize step currently takes over 140 GB RAM. There might be some low hanging fruits in the activitysim source code that can reduce the memory needed for summarize, I have some ideas and am exploring that.

@i-am-sijia
i-am-sijia marked this pull request as ready for review October 5, 2026 17:20
@i-am-sijia

i-am-sijia commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator Author

Got the machine memory peak down from 160 GB to 108 GB when running the summarize step. Deducting the 23 GB idle RAM, the summarize step now requires 85 GB RAM.

Require ActivitySim source code change: https://github.com/wsp-sag/activitysim/tree/reduce-summarize-mem

Before:
sys_usage_original_summarize_memory_timeseries

After:
sys_usage_new_memory_timeseries

@i-am-sijia
i-am-sijia merged commit 225efe6 into CTPSSTAFF:main Oct 5, 2026
3 checks passed
@i-am-sijia
i-am-sijia deleted the laptop-memory-simple branch October 5, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant