[erlang-questions] Design question -- a valid or foolhardy approach to ets update?

Steve Davis steven.charles.davis@REDACTED
Wed Jul 15 00:08:48 CEST 2009


Hi Ulf,

Interesting indeed! Time I had a really close read of the latest ets 
documentation.

In this case, that option in ets:new is highly appropriate as the table 
is unusually write heavy,  updates of ttl for every connection, updating 
session data... i.e. authenticated user and various application-level 
userdata related to that session, and finally clearing out stale sessions.

It will be a while until I am in a position to profile/load test, but 
I'll be sure to report results when I have them.

My thanks and best regards,

Steve

Mihai Balea wrote:
> 
> On Jul 14, 2009, at 10:28 AM, Ulf Wiger wrote:
>>
>> From the documentation of ets:new(...):
>>
>> "{write_concurrency,bool()}
>> Performance tuning. Default is false, which means that the table is 
>> optimized towards concurrent read access. An operation that mutates 
>> (writes to) the table will obtain exclusive access, blocking any 
>> concurrent access of the same table until finished. If set to true, 
>> the table is optimized towards concurrent write access. Different 
>> parts of the same table can be mutated (and read) by concurrent 
>> processes. This is achieve to some degree at the expense of single 
>> access and concurrent reader performance. Table typ ordered_set is not 
>> affected by this option in current implementation."
> 
> Good stuff, I wasn't aware of that.
> 
> Mihai



More information about the erlang-questions mailing list