On Feb 8, 2018, at 9:57 AM,Timothy Penner wrote: >> And this is something many of us have been wanting for a long time. The >> ability to have each Stored Procedure running on 4D Server be a preemptive >> process so that it cannot hog the CPU. Then my comment about putting using >> DELAY PROCESS to throttle down Stored Procedures would not be necessary. The >> Stored Procedure would get managed by the operating system and its load >> would spread out over all cores on the CPU. Hence it would not have such a >> big impact on end user experience. Right? > > No. Each preemptive process can take up to 1 full core. > If you have 10 cores you want to utilize then you can run 10 premptive > processes.
But currently every process for every user and every Stored Procedure all run on the same core on 4D Server. Everything that uses the 4D language on the server shares the same core. Right? So if you have 5 Stored procedures and they all are running at the exact same time, then with preemptive processes each Stored Procedure would run on it’s own core. So instead of 5 Stored Procedures all sharing 1 core, each get’s it’s own core. And the operating system will move those 5 Stored Procedures around to different cores as it sees fit. It is the elimination of sharing a single core on 4D Server for everything that uses the language that is where you get the benefit. So a single preemptive process can hog the CPU all it wants but it can only do that on a single core. All the other cores are free from this hogging and can go about their normal business and not be dramatically impacted as they are now. Am I understanding this right? >> One more question. Do triggers running on 4D Server also benefit from this? >> Can they all run as preemptive processes? If so, is this something that >> happens automatically? If you just have some code in a trigger, does it run >> preemptively or cooperatively? Or do you have to call a method from the >> trigger that is set to run preemptive to get this? I’ve never understood >> exactly how this works in regards to triggers. > > I don’t think Triggers work that way. But this sounds like a great question > to ask at the Summit in DC this April (or in Paris this March). I will definitely do that. I think is is a very important implementation point to understand. Particularly if you half a system with 200+ users all saving records in tables that all have trigger code. Tim ***************************************** Tim Nevels Innovative Solutions 785-749-3444 [email protected] ***************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

