From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:295:: with SMTP id 143-v6mr320449itu.55.1522362788556; Thu, 29 Mar 2018 15:33:08 -0700 (PDT) X-Received: by 2002:a9d:6217:: with SMTP id g23-v6mr1845026otj.11.1522362788421; Thu, 29 Mar 2018 15:33:08 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.unit0.net!peer01.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!199-v6no259652itl.0!news-out.google.com!u64-v6ni263itb.0!nntp.google.com!u184-v6no257509ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 29 Mar 2018 15:33:08 -0700 (PDT) In-Reply-To: <1aa8f536-250d-4bef-9392-4d936f916e5f@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.113.16.86; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 76.113.16.86 References: <1aa8f536-250d-4bef-9392-4d936f916e5f@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <9377f941-31d0-4260-818a-8e189aac8c19@googlegroups.com> Subject: Re: Large number of tasks slows down my program (using debian) - any fix? From: Shark8 Injection-Date: Thu, 29 Mar 2018 22:33:08 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2498 X-Received-Body-CRC: 2847518452 Xref: reader02.eternal-september.org comp.lang.ada:51253 Date: 2018-03-29T15:33:08-07:00 List-Id: On Wednesday, March 28, 2018 at 12:06:31 PM UTC-6, reinert wrote: > Hei, >=20 > I use gnat on debian (latest version). Now I tried to initiate a large nu= mber of (access) tasks ( "t :=3D new atask_type" ). When I try to start, sa= y, 500 tasks, my program slows down whithout any apparent reason (before th= e tasks do anything). > Any hope for a quick fix? Hm, you shouldn't be hitting the limit with so few tasks. (500 sounds like = a lot, but most OSes you'll be using use an integer-ID; meaning something o= n the order of 2**32 or 2**64.) If there's data-initialization going on that may be contributing to the iss= ue. It could also be problems with ACCESS-types, does the problem persist with = non-access setups? Lastly, take a look at your problem. Some problems are good with task-decom= position, others not so; those which are "embarrassingly parallel" are prob= ably where you'll benefit the most from parallelizing. (e.g. The 'Exponenti= ation' trick.) -- Though Ada Tasks also lend themselves well to decomposing= a sub-system, and that could be used to great effect, though this use isn'= t particularly a "parallel"-problem.