From: Nick Savoiu <savoiu@yahoo.com>
To: gdb@sourceware.org
Subject: Re: GDB using a lot of CPU time and writing a lot to disk on startup
Date: Tue, 21 Apr 2009 19:04:00 -0000 [thread overview]
Message-ID: <808758.98762.qm@web52004.mail.re2.yahoo.com> (raw)
In-Reply-To: <200904211551.n3LFphaO009791@brahms.sibelius.xs4all.nl>
----- Original Message ----
> From: Mark Kettenis <mark.kettenis@xs4all.nl>
> > From: Nick Savoiu
> >
> > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> > 2381 nsavoiu 15 0 594m 424m 34m S 0 10.9 0:49.13 kdevelop
> > 2381 nsavoiu 16 0 594m 424m 34m S 1 10.9 0:49.31 kdevelop
> >
> > 7810 nsavoiu 16 0 140m 130m 2472 S 22 3.4 0:03.92 gdb
> > 7810 nsavoiu 16 0 634m 622m 2536 S 73 16.0 1:51.12 gdb
>
> Heh, if memory consumption is to blame, kdevelop is about as guilty as
> gdb ;)
>
> > 7816 nsavoiu 25 0 153m 138m 61m T 0 3.6 0:08.23 kernel
> > 7816 nsavoiu 25 0 153m 138m 61m T 0 3.6 0:08.23 kernel
> >
> > so my best guess was GDB given where the CPU times went. No other processes
> were running actively and there was enough memory
> >
> > Mem: 3975148k total, 3372012k used, 603136k free, 86136k buffers
> > Swap: 8385848k total, 756112k used, 7629736k free, 1407932k cached
> >
> > so swapping should not be an issue.
>
> Well, your system *is* using swap. Are you running Linux? I wouldn't
> be surprised if it is swapping out kdevelop because gdb is the active
> application and is reading in a lot of debugging info.
Mark, I highly doubt that it's swapping. The system has plenty of memory (the snapshot above is at the end of the run) and swap usage had not changed throughout. More so the memory amounts involved should not account for 10 minutes of continuous disk writes on a machine that is otherwise very fast (both in CPU and disk).
What's puzzling is that an identical project on the same machine does not exhibit the same behavior. GDB gets to the 'main' breakpoint in 15-20 seconds with very mild disk activity. Is there a way to make gdb dump a trace/log of its activities?
Nick
next prev parent reply other threads:[~2009-04-21 16:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-20 23:40 Nick Savoiu
2009-04-20 23:48 ` Paul Pluzhnikov
2009-04-20 23:55 ` Daniel Jacobowitz
2009-04-21 0:17 ` Paul Pluzhnikov
2009-04-21 5:22 ` Nick Savoiu
2009-04-21 15:52 ` Mark Kettenis
2009-04-21 19:04 ` Nick Savoiu [this message]
2009-04-21 19:52 ` Eli Zaretskii
2009-04-22 6:42 ` Jonas Maebe
2009-04-22 17:23 ` Nick Savoiu
2009-04-22 17:35 ` Nick Savoiu
2009-04-22 17:39 ` Michael Snyder
2009-04-22 17:57 ` Jonas Maebe
2009-04-22 19:18 ` Toby Haynes
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=808758.98762.qm@web52004.mail.re2.yahoo.com \
--to=savoiu@yahoo.com \
--cc=gdb@sourceware.org \
/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