a soft real-time system using python

anton wilson anton.wilson at camotion.com
Thu Aug 1 16:55:51 CEST 2002


On Wednesday 31 July 2002 07:33 pm, Peter Hansen wrote:
> anton wilson wrote:
> > For further information, we're already having a certain problem where
> > python threads seem to drastically decrease performance in the middle of
> > the program for around a second. Garbage collection has been disabled,
> > but it's possible that there is some other behind-the-scenes work that
> > Python is doing. What other things should we be worrying about? I need a
> > more complete understanding of what can happen or is happening that would
> > affect consistent running of a python program.
>
> Do you want consistency or simply a high likelihood that operations will
> complete within some soft upper limit?  The latter is soft realtime, the
> former is something different.

Consistent behaviour (no large stalls by any thread or any one thread 
monopolizing the GIL) with the high liklihood that python threads run (do the 
work we give them to do) when we give them access to the cpu. We're not as 
concerned that they finish by a certain time as with them just doing the work 
consistently because we're only going to make them call C functions.


>
> By the way, I don't think you've mentioned yet which platform you are
> running on.  If the underlying platform is not itself realtime, you might
> be seeing effects from it, rather than from Python itself.  We certainly
> found lengthier pauses in our applications running under NT and (obviously)
> 98 than we have under Linux for similar hardware...

We're using linux 2.4.19-rc2 with the O(1) scheduler and the low-latency 
patch. I haven't quite changed the pre-emptive path to work properly yet.

>
> -Peter




More information about the Python-list mailing list