Comments on Replacing C

Gary E. Miller gem at rellim.com
Mon Jan 9 02:47:20 UTC 2017


Yo Hal!

On Sun, 08 Jan 2017 18:40:42 -0800
Hal Murray <hmurray at megapathdsl.net> wrote:

> > Yes, threads will help a lot.  I remember when Apache and Mysql
> > started to use good threading.  It really helps when you can use
> > all 16 cores on a CPU instead of just one.  
> 
> That depends on the nature of your problem.  In addition to threads,
> you also need locks.  If most of the work is under a single lock,
> more threads won't help.  All the extra threads will be waiting for
> the lock.

I think not.  Most of the threads will be servering clients.  All a
thread needs to serve a client is the incoming packet and the current
local time.  No locks needed for that.

The client threads will prolly need some locking, but I doubt anyone
has more than 40 refclocks or peers.

The big win os for NTp servers with hundreds of clients.

> > And I 100% agree, if we are talking about Python threads.  With the
> > GIL the performance is no improvement over single trheaded.   
> 
> That's a separate issue.

Not so separate.  A good language makes threading easier, a bad language
makes it hard or counterproductive.  Eric spends more time in languages
with poor threading, thus a distaste for threading.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170108/4137bc35/attachment.bin>


More information about the devel mailing list