Skip to content

Commit 40b3a3d

Browse files
committed
Merge branch 'maint'
2 parents 62ee409 + adc4523 commit 40b3a3d

3 files changed

Lines changed: 17 additions & 15 deletions

File tree

erts/doc/references/erl_cmd.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,10 @@ behavior of earlier flags.
595595
keeping track of the memory consumption and the number of terms in ETS tables
596596
of type ordered_set with the write_concurrency option activated.
597597

598-
- **`+e Number`{: #+e }** - Sets the maximum number of ETS tables. This limit is
599-
[partially obsolete](`m:ets#max_ets_tables`).
598+
- **`+e Number`{: #+e }** - Sets a sizing hint for the internal index used to
599+
look up named ETS tables. It does not limit the number of ETS tables. Values
600+
below 8192 are treated as 8192, and the number of lookup buckets is rounded up
601+
to a power of two. See [ETS table sizing](`m:ets#max_ets_tables`).
600602

601603
- **`+ec`** - Forces option `compressed` on all ETS tables. Only intended for
602604
test and evaluation.

erts/doc/src/erlang_system_info.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,10 @@ Returns information about the current system (emulator) limits as specified by `
368368

369369
Since: OTP 21.1
370370

371-
- `ets_limit`{: #system_info_ets_limit } - Returns the limit for number of
372-
ETS tables. This limit is [partially obsolete](`m:ets#max_ets_tables`) and
373-
number of tables are only limited by available memory.
371+
- `ets_limit`{: #system_info_ets_limit } - Returns the effective sizing hint for
372+
the internal index used to look up named ETS tables. Despite its historical
373+
name, this value does not limit the number of ETS tables; they are limited only
374+
by available memory. See [ETS table sizing](`m:ets#max_ets_tables`).
374375

375376
Since: OTP R16B03
376377

lib/stdlib/src/ets.erl

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,15 @@ are proportional to the logarithm of the number of objects in the table.
5858

5959
> #### Note {: .info }
6060
>
61-
> The number of tables stored at one Erlang node _used_ to be limited. This is
62-
> no longer the case (except by memory usage). The previous default limit was
63-
> about 1400 tables and could be increased by setting the environment variable
64-
> `ERL_MAX_ETS_TABLES` or the command line option
65-
> [`+e`](`e:erts:erl_cmd.md#%2Be`) before starting the Erlang runtime system.
66-
> This hard limit has been removed, but it is currently useful to set the
67-
> `ERL_MAX_ETS_TABLES` anyway. It should be set to an approximate of the maximum
68-
> amount of tables used since an internal table for named tables is sized using
69-
> this value. If large amounts of named tables are used and `ERL_MAX_ETS_TABLES`
70-
> hasn't been increased, the performance of named table lookup will degrade.
61+
> The number of ETS tables at one Erlang node is limited only by available
62+
> memory. The environment variable `ERL_MAX_ETS_TABLES` and the command line
63+
> option [`+e`](`e:erts:erl_cmd.md#%2Be`) do not limit this number. They set a
64+
> sizing hint for an internal index used to look up named ETS tables.
65+
>
66+
> Workloads that keep a large number of named tables concurrently can set the
67+
> hint to approximately the expected peak number of named tables. A value that
68+
> is too small can increase hash collisions and degrade named table lookup
69+
> performance, while an unnecessarily large value increases memory usage.
7170
7271
Notice that there is no automatic garbage collection for tables. Even if there
7372
are no references to a table from any process, it is not automatically destroyed

0 commit comments

Comments
 (0)