Opened 4 years ago

Last modified 6 months ago

#1718 new enhancement

MemSpeed: Re-use allocated memory

Reported by: Erik Schnetter Owned by:
Priority: minor Milestone:
Component: EinsteinToolkit thorn Version: development version
Keywords: Cc:


Allocating memory is slow. In thorn MemSpeed, we should re-use memory that has been allocated instead of allocating new memory for each benchmark.

Attachments (0)

Change History (3)

comment:1 Changed 6 months ago by Roland Haas

Maybe related to this. The MemSpeed test takes lots of memory, namely 64GB on bethe:

23714 rhaas     20   0   34.4g  32.0g  17016 R  47.4 12.7   3:09.85 cactus_sim
26084 rhaas     20   0   33.4g  32.0g  17308 R  42.1 12.7   1:39.39 cactus_sim

It really should use less memory (<200MB would be preferable) to avoid eg trashing when running on someones laptop or workstation.

Is the amount of memory used fixed or proportional to the memory available on the host (bethe has lots: 263867020)?

Last edited 6 months ago by Roland Haas (previous) (diff)

comment:2 Changed 6 months ago by Erik Schnetter

MemSpeed needs to allocate sufficiently much memory to ensure that the measurement is not handled by the L3 cache. By default, it allocates 1/4 of 1 NUMA node worth of memory. There is an option to allocate even more memory so that the inter-NUMA memory speed can also be measured.

If you run one or two instances of MemSpeed simultaneously, there should be no swapping. I do this regularly on my laptop.

It should be possible to limit this further to e.g. at most 10x the last-level cache size.

comment:3 Changed 6 months ago by Roland Haas

That may be a good idea. The MemSpeed test on 2 MPI ranks on my workstation (96GB of memory, each MemSpeed ranks uses 12GB) is also quite slow, taking about 10 minutes to finish.

Modify Ticket

Change Properties
Set your email in Preferences
as new The ticket will remain with no owner.
Next status will be 'review'.
as The resolution will be set.
to The owner will be changed from (none) to the specified user.
Next status will be 'confirmed'.
The owner will be changed from (none) to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.