Skip to content

Commit ccd5c9f

Browse files
authored
set max_core_instance_size in pooling config (#2721)
...and make it configurable via an environment variable. Also, increase the `table_elements` default value. As of this writing, ahead-of-time compiled ASP.NET Core apps require more memory for metadata and larger tables than we had previously anticipated. This allows them to run. Signed-off-by: Joel Dice <joel.dice@fermyon.com>
1 parent 10bfdfd commit ccd5c9f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/core/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,12 @@ impl Default for Config {
113113
.max_component_instance_size(
114114
env("SPIN_WASMTIME_INSTANCE_SIZE", (10 * MB) as u32) as usize
115115
)
116+
.max_core_instance_size(
117+
env("SPIN_WASMTIME_CORE_INSTANCE_SIZE", (10 * MB) as u32) as usize
118+
)
116119
.max_core_instances_per_component(env("SPIN_WASMTIME_CORE_INSTANCE_COUNT", 200))
117120
.max_tables_per_component(env("SPIN_WASMTIME_INSTANCE_TABLES", 20))
118-
.table_elements(env("SPIN_WASMTIME_INSTANCE_TABLE_ELEMENTS", 30_000))
121+
.table_elements(env("SPIN_WASMTIME_INSTANCE_TABLE_ELEMENTS", 100_000))
119122
// The number of memories an instance can have effectively limits the number of inner components
120123
// a composed component can have (since each inner component has its own memory). We default to 32 for now, and
121124
// we'll see how often this limit gets reached.

0 commit comments

Comments
 (0)