<div dir="ltr">On Thu, Aug 15, 2013 at 9:34 AM, Patrik Nyblom <span dir="ltr"><<a href="mailto:pan@erlang.org" target="_blank">pan@erlang.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Yes, one example is process exit, where close definitely should not
be intermingled <br></div>
with other file operations from other threads that are ongoing. That
definitely happens if<br>
you round robin the file descriptors.</div></blockquote><div><br></div><div>Perhaps the close could be enqueued on the descriptor work queue but not issued to</div><div>the async thread queue until any outstanding ops have finished, though it doesn't look</div>
<div>like the descriptor currently keeps track of how many async ops are outstanding.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
Yes, probably. It is not safe though, especially compressed files in
combination with <br>
processes getting exit (kill) signals during the file operations may
core the VM.<br></div></blockquote><div><br></div><div>In our case, the file procs run forever, so I think our risk will be low on this particular</div><div>system. I've enabled the behavior via an env var, so we won't be running this on the</div>
<div>rest of our systems.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
With better distribution of the FD's maybe you can get as good
results as with <br>
the round robin without risks?</div></blockquote><div><br></div><div>Unfortunately not. The only way to ensure that there wouldn't a noticeable difference</div><div>in load between different async threads would be to either have far too many or far</div>
<div>too few async threads.</div><div> </div><div>Rr</div></div></div></div>