Re: Threads, Sockets and OSX

Eric Wong <[email protected]>
Newsgroups gmane.comp.lang.ruby.general
Message-ID <20181205202749.cxt6dvmprlrnh56q@dcvr>
Peter Hickman <[email protected]> wrote:
> My first thought was the GC was kicking in and so I have been trying to
> find ways to reduce the amount of GC that needs to be done as well as
> calling it when I have created or deleted structures so that it does not
> accumulate a pile of work and kick in unexpectedly
> 
> This has reduced the number of times that the timeout causing freezes have
> happened but not affected the other freezes and has also reduced the
> throughput

OK, so it is at least partially memory-management related.

Can you try the OSX build with jemalloc?

And what Ruby versions are you running?

Ruby 2.5 and 2.6 also have a new Mutex implementation which is
less OS-dependent, smaller and faster (at least on Linux):

	https://bugs.ruby-lang.org/issues/13517

	(I just fixed a bug in it, earlier :x
	 https://bugs.ruby-lang.org/issues/15383)

> Where is the problem with OSX
> 1) Threads
> 2) Sockets
> 3) Mutexes

I'm not familiar with profiling tools for OSX, but I'm sure
there are some which can help you find the problem.

AFAIK, nobody working on ruby-core can fix problems in OSX itself.

In Ruby itself, GNU/Linux and OSX share much of the code in all
those areas.  Use process of elimination to isolate the
performance of each element.

And with just about any autoconf program, you don't need root
to install C Ruby; use "./configure --prefix=$HOME/somewhere ..."

I guess stuff like RVM/rbenv is also popular, too, but I don't
use them.

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.