[erlang-questions] ETS delete_trap
Lukas Larsson
garazdawi@REDACTED
Tue Apr 26 16:51:36 CEST 2016
On Tue, Apr 26, 2016 at 4:39 PM, James Aimonetti <james@REDACTED> wrote:
> we are using ets:delete(Tab, Key) for each Key found in the worker process
>
> The only other delete operation is to flush the whole table
> with ets:delete_all_objects/1.
>
>From what I can tell in the vm source neither ets:delete/2 or
ets:delete_all_objects/1 should end up in a yield to ets:delete_trap/1.
Only ets:select_delete/2 or ets:delete/1 take that code path.
>
> We haven't tried enabling the read/write concurrency flags yet; would
> write_concurrency make a difference when calling ets:delete/2?
If you have multiple other processes doing reads/writes into the table at
the same time as you are doing deletion in it, then yes it may help speed
things up.
> Any tips on profiling ETS usage and finding efficiencies?
>
I would use tracing, either call_time or just plain ordinary call+return
tracing together with timestamps to see if any suspect ets function take a
long time to complete and then from there try to figure out why.
Lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160426/b0b5371c/attachment.htm>
More information about the erlang-questions
mailing list