[Xastir-dev] Xastir a CPU pig again?

Tom Russo russo at bogoflux.losalamos.nm.us
Thu Dec 25 19:16:51 EST 2003


On Thu, Dec 25, 2003 at 06:08:33PM -0500, a Mr. Richard Feyler of Fort Lee, New Jersey <bdheaton at c4i2.com> writes 'Dear Rosanne Rosannadanna':
> On Thu, 2003-12-25 at 18:05, Tom Russo wrote:
> > I can confirm it is in fact exactly the source of the problem.  I
> > changed the 100us delay in interface.c that had been reduced from
> > 200ms sometime between 4 Dec and 8 Dec.  In the 25 Dec CVS version
> > this is on line 5307.  Setting it to 100ms instead of 100us ended my
> > problems.  With that change (and no other) both the 8 Dec and current
> > CVS versions of Xastir are back down to taking negligible CPU times.

> > Now to figure out if the issue with CVS gdal instead of gdal-1.1.9
> > is a real one, or just a red herring.

> 
> 	Interesting.  I wonder if th 100us vs. 100ms was a typo when the change
> was committed? 

Well, the tmv.tv_usec setting went from 200000 to 100 in one edit, and
the units in the comments changed to match it as well.  I'm guessin'
it was intentional and related to the change that resulted in the
inter-char pacing slider.

> 	Was there ever a resolution on what was different between BSD and the
> various linux distros that were experiencing the symptoms? I recall the
> discussion, but don't recall is there was a final isolation of where the
> interaction with the OS was causing it.  

No, the precise issue in the OS was not ever isolated, although the
conclusion was that the 1ms delay ("nexttime") before calling
UpdateTime again needed to be bumped up to 2ms.  On my system that
minor tweak brought xastir from 98% cpu usage down to less than 2% on
my old 300MHz PII machine, and less than .5% on all the faster ones.

My guess (and it's just that) is that it's related to the different
implementation of pthreads that BSD uses, which in versions prior to
the unstable 5.1 development branch (which I won't use because I need
stable servers) is known to be less efficient than Linux's.  But I
believe there was at least one person who saw a dramatic CPU usage
improvement on RH Linux, so perhaps that guess is way off.

-- 
Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236 AHTB#1 http://www.qsl.net/~km5vy/
 echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]



More information about the Xastir-dev mailing list