<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hello,<div><br></div><div>This is suspension for garbage collection.</div><div><br></div><div>- Dmitry</div><div><br><div><div>On 02 Feb 2014, at 23:38, Philip Clarke <<a href="mailto:send2philip@gmail.com">send2philip@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi,<div><br></div><div style="">I have been doing some profiling using fprof on my system.</div><div style=""><div>Using fprof I see that ets:select is calling suspend.</div><div><br></div></div><div style="">I suspect that I have found a bottleneck where I have an ets table with write_concurrency defined and there are lots of processes doing reads thousands of times per second. But my question is more general to profiling.</div>
<div style=""><br></div><div style="">What exactly does suspend do ? I suspect it may be an indication that my process has run out of reductions and is preempted by the scheduler ?</div><div style="">Could anyone confirm please ?</div>
<div style=""><br></div><div style="">Just in case it is useful, here is the relevant part of my fprof analysis file.</div><div style=""><br></div><div style=""><div><font face="courier new, monospace">{[{{mymodule,get_values,1}, 6, 2992.735, 31.313}],</font></div>
<div><font face="courier new, monospace"> { {ets,select,2}, 6, 2992.735, 31.313}, %</font></div><div><font face="courier new, monospace"> [{suspend, 92, 1707.908, 0.000},</font></div>
<div><font face="courier new, monospace"> {{lists,sum,1}, 6, 1251.655, 0.709},</font></div><div><font face="courier new, monospace"> {garbage_collect, 7, 1.859, 1.859}]}.</font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">{[{{ets,select,2}, 6, 1251.655, 0.709}],</font></div><div><font face="courier new, monospace"> { {lists,sum,1}, 6, 1251.655, 0.709}, %</font></div>
<div><font face="courier new, monospace"> [{{lists,sum,2}, 6, 1250.946, 0.047}]}.</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">{[{{lists,sum,1}, 6, 1250.946, 0.047},</font></div>
<div><font face="courier new, monospace"> {{lists,sum,2}, 20647, 0.000, 1241.206}],</font></div><div><font face="courier new, monospace"> { {lists,sum,2}, 20653, 1250.946, 1241.253}, %</font></div>
<div><font face="courier new, monospace"> [{suspend, 10, 9.693, 0.000},</font></div><div><font face="courier new, monospace"> {{lists,sum,2}, 20647, 0.000, 1241.206}]}.</font></div>
<div><br></div></div><div style="">Thanks</div><div style="">Philip</div><div style=""><br></div></div>
_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>http://erlang.org/mailman/listinfo/erlang-questions<br></blockquote></div><br></div></body></html>