From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21671 invoked by alias); 2 Feb 2011 20:16:44 -0000 Received: (qmail 21662 invoked by uid 22791); 2 Feb 2011 20:16:43 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from zwopi.com (HELO daffy.zwopi.com) (85.214.124.126) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 Feb 2011 20:16:37 +0000 Received: by daffy.zwopi.com (Postfix, from userid 80) id 0D8CB83; Wed, 2 Feb 2011 21:16:33 +0100 (CET) To: "gdb@sourceware.org" Subject: performance of multithreading gets gradually worse under gdb X-PHP-Originating-Script: 0:func.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 02 Feb 2011 20:16:00 -0000 From: Markus Alber Message-ID: <8b62d2819c94a232987155aa99e01983@hyperion-imrt.org> X-Sender: markus@hyperion-imrt.org User-Agent: Roundcube Webmail/0.5 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00010.txt.bz2 Hello, I have experienced the following problem: I'm debugging a number-crunching application which spawns a lot (36) little worker threads per iteration. The system does typically OoM 200 iterations. Although each of them should take about the same amount of time, the performance gets worse with every iteration and becomes excruciatingly slow. A system monitor reveals that gdb allocates more memory with every iteration, i.e. with every 36 threads started and finished. The CPU load of GDB goes up, too. The CPU usage of the application goes down. Compared to the solo performance, it gets slower by a factor 20 and more, if run long enough. The application behaves perfectly when run by itself. The multi-threaded part is not debugging compiled when this behaviour occurs. The distribution is SuSE 11.3 / gdb 7.1. Is there anything I can change about this behaviour, any options of gdb that need to be set in these circumstances? Thank you very much for your help in advance, Markus