[Vm-dev] [Pharo-dev] Problem with OSSubprocess / signals / heartbeat ?

Petr Fischer petr.fischer at me.com
Sun Apr 2 17:27:34 UTC 2017


> On Sun, Apr 2, 2017 at 3:11 AM, Petr Fischer <petr.fischer at me.com> wrote:
> 
> > > On Thu, 30 Mar 2017, Eliot Miranda wrote:
> > >
> > > > Once the active process is in a tight loop the delay is effectively
> > > disabled because the tight loop effectively shuts out the heartbeat
> > thread
> > > and hence the system never notices that the delay has expired.
> > >
> > > I think that won't happen, because the process scheduler (O(1), CFS,
> > BFS) on
> > > linux is not cooperative. So, the kernel will periodically preempt the
> > main
> > > thread and run the heartbeat thread no matter what their priorities are.
> > The
> > > higher priority only provides lower jitter on the heartbeat thread.
> > >
> > > Levente
> >
> > Is there some test case or code, that I can run in Pharo and evaluate if
> > kernel sheduler is working correctly (with heartbeat thread at normal
> > priority).
> > I need to test it under FreeBSD.
> >
> > Thanks! pf
> >
> 
> Just for starters, what result do you get for my multi-priority fibonacci
> stress test...
> http://forum.world.st/Unix-heartbeat-thread-vs-itimer-tp4928943p4938456.html
> cheers -ben

And results from inside FreeBSD JAIL (something like chrooted secured sandbox or Solaris zone), test laptop also loaded with other processes like in test before):

----------------------------
Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz
No. of Cores:   4
INSIDE JAIL

N=1000000000 ; for NPROC in 1 ; do (./a.out 19 $N &) && (./a.out 1 $N &) && (./a.out 0 $N &) ; done
34160 @ 19	 ==> execution time 6:658293335
34164 @ 0	 ==> execution time 7:344659449
34162 @ 1	 ==> execution time 7:349528844

N=1000000000 ; for NPROC in 1 2 ; do (./a.out 19 $N &) && (./a.out 1 $N &) && (./a.out 0 $N &) ; done
34494 @ 1	 ==> execution time 9:103074882
34488 @ 1	 ==> execution time 9:377005820
34485 @ 19	 ==> execution time 10:169357290
34490 @ 0	 ==> execution time 12:431283848
34496 @ 0	 ==> execution time 12:435207151
34492 @ 19	 ==> execution time 15:141234946

N=1000000000 ; for NPROC in 1 2 3 ; do (./a.out 19 $N &) && (./a.out 1 $N &) && (./a.out 0 $N &) ; done
34687 @ 1	 ==> execution time 8:609114439
34683 @ 0	 ==> execution time 10:558500185
34695 @ 0	 ==> execution time 10:595350437
34693 @ 1	 ==> execution time 14:831554545
34689 @ 0	 ==> execution time 17:83945157
34681 @ 1	 ==> execution time 18:87479507
34691 @ 19	 ==> execution time 19:826694016
34685 @ 19	 ==> execution time 20:95071917
34679 @ 19	 ==> execution time 20:703022751

N=1000000000 ; for NPROC in 1 2 3 4 ; do (./a.out 19 $N &) && (./a.out 1 $N &) && (./a.out 0 $N &) ; done
34891 @ 0	 ==> execution time 9:999782187
34905 @ 19	 ==> execution time 17:881143544
34909 @ 0	 ==> execution time 17:959943746
34903 @ 0	 ==> execution time 18:322021733
34889 @ 1	 ==> execution time 19:808572223
34895 @ 1	 ==> execution time 20:66256169
34907 @ 1	 ==> execution time 20:779405952
34897 @ 0	 ==> execution time 23:65989500
34901 @ 1	 ==> execution time 23:930198240
34899 @ 19	 ==> execution time 26:775605581
34887 @ 19	 ==> execution time 26:859268875
34893 @ 19	 ==> execution time 27:160633495

N=1000000000 ; for NPROC in 1 2 3 4 5 ; do (./a.out 19 $N &) && (./a.out 1 $N &) && (./a.out 0 $N &) ; done
35136 @ 0	 ==> execution time 9:721558687
35156 @ 19	 ==> execution time 18:551098074
35134 @ 1	 ==> execution time 18:642816376
35152 @ 1	 ==> execution time 18:784739098
35146 @ 1	 ==> execution time 19:845043925
35140 @ 1	 ==> execution time 19:936571188
35160 @ 0	 ==> execution time 23:351587301
35142 @ 0	 ==> execution time 27:74930475
35132 @ 19	 ==> execution time 27:627105815
35150 @ 19	 ==> execution time 31:576758248
35148 @ 0	 ==> execution time 32:178976338
35144 @ 19	 ==> execution time 32:313815914
35154 @ 0	 ==> execution time 32:713757378
35158 @ 1	 ==> execution time 33:128044152
35138 @ 19	 ==> execution time 33:697034678
----------------------------


More information about the Vm-dev mailing list