unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: "Hans Åberg" <haberg-1@telia.com>
To: linasvepstas@gmail.com
Cc: Guile User <guile-user@gnu.org>
Subject: Re: GC thread performance
Date: Sat, 2 Dec 2017 00:23:58 +0100	[thread overview]
Message-ID: <4FE6EE23-CB67-4058-A981-05F76DCFDA75@telia.com> (raw)
In-Reply-To: <CAHrUA376aefOXvkkx+J=NUd6unvctTB+vpj+4C1H14ndFn3hVw@mail.gmail.com>



> On 1 Dec 2017, at 20:49, Linas Vepstas <linasvepstas@gmail.com> wrote:
> 
> On Mon, Nov 27, 2017 at 5:44 PM, Hans Åberg <haberg-1@telia.com> wrote:
> 
>> 
>> 
>>> On 28 Nov 2017, at 00:23, Marko Rauhamaa <marko@pacujo.net> wrote:
>>> 
>>> Hans Åberg <haberg-1@telia.com>:
>>>> I saw overhead also for the small allocations, 20-30% maybe. This is
>>>> in a program that makes a lot of allocations relative other
>>>> computations. So that made me wonder about Guile.
>> 
> 
> I cannot speak to GC, but I freuqently encounter situations in guile where
> using the parallel constructs e.g. par-for-each, end up running slower than
> the single-threaded version. For example, using 2 or 3 threads, I get a 2x
> and 3x speedup, great, but using 4x gives a slowdown, often 10x slower than
> single-threaded. I try to make sure that the insides of the loop are large
> and long-running, so that the cost of creating and scheduling threads is
> inconsequential.

In the program I tested it depends on what I run, but one pattern is that user time goes up about two times when approaching the hardware concurrency, and then stabilizes. System time jumps up thirty times when going from one to two threads, and then further doubles when approaching the hardware concurrency.

> I have not attempted to determine the cause of this, but basically, that
> entire subsystem needs a careful review and measurement.

The GC also collects outside the main thread, so if that part takes up too much system resources, the program itself might too slow down by that.





  reply	other threads:[~2017-12-01 23:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27 22:40 GC thread performance Hans Åberg
2017-11-27 23:05 ` Stefan Israelsson Tampe
2017-11-27 23:13   ` Hans Åberg
2017-11-27 23:23     ` Marko Rauhamaa
2017-11-27 23:44       ` Hans Åberg
2017-12-01 19:49         ` Linas Vepstas
2017-12-01 23:23           ` Hans Åberg [this message]
2017-12-02  8:50           ` Marko Rauhamaa
2017-12-02 14:20             ` Hans Åberg
2017-12-03 22:15               ` Arne Babenhauserheide
2017-12-04  9:38                 ` Hans Åberg
2017-12-02 14:30             ` Chris Vine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FE6EE23-CB67-4058-A981-05F76DCFDA75@telia.com \
    --to=haberg-1@telia.com \
    --cc=guile-user@gnu.org \
    --cc=linasvepstas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).