* Question:kernel profiling and readprofile
@ 2002-05-23 13:21 will fitzgerald
2002-05-23 14:05 ` Padraig Brady
0 siblings, 1 reply; 4+ messages in thread
From: will fitzgerald @ 2002-05-23 13:21 UTC (permalink / raw)
To: linux-kernel
hi all,
i stumbled accross a command called readprofile by accident and found
that by appening the line append="profile=2" to the lilo.conf file
and using thread profile command you can get statistics on functions
that spend a certain amount of time doing a job.
i done some searching on this and can't find anything other than a
man page on readprofile.
can anyone tell me what does the line append="profile=2" actually do
apart from creating the file profile in the proc directory, what is
the 2 for in this line?
next is this an accurate way to measure heady traffic load through
say a linux router? will it highlight all functions say for example
ip_forward, dev_queue_xmit etc etc that are being opverloaded due to
huge traffic loads being passed through the router. ie will it spot
bottlenecks with good accuracy?
any feedback is welcomed,
regards will.
Beer Mail, brought to you by your friends at beer.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question:kernel profiling and readprofile
2002-05-23 13:21 Question:kernel profiling and readprofile will fitzgerald
@ 2002-05-23 14:05 ` Padraig Brady
2002-05-23 14:17 ` Richard B. Johnson
2002-05-23 15:24 ` Randy.Dunlap
0 siblings, 2 replies; 4+ messages in thread
From: Padraig Brady @ 2002-05-23 14:05 UTC (permalink / raw)
To: will fitzgerald; +Cc: linux-kernel
will fitzgerald wrote:
> hi all,
>
> i stumbled accross a command called readprofile by accident and found
> that by appening the line append="profile=2" to the lilo.conf file
> and using thread profile command you can get statistics on functions
> that spend a certain amount of time doing a job.
>
> i done some searching on this and can't find anything other than a
> man page on readprofile.
>
> can anyone tell me what does the line append="profile=2" actually do
> apart from creating the file profile in the proc directory, what is
> the 2 for in this line?
The level. see linux/Documentation/kernel-parameters.txt
Also worth looking at is http://oss.sgi.com/projects/kernprof/
> next is this an accurate way to measure heady traffic load through
> say a linux router?
I presume you don't want to actually measure traffic throughput
as there are obviously other ways to do this.
> will it highlight all functions say for example
> ip_forward, dev_queue_xmit etc etc that are being opverloaded due to
> huge traffic loads being passed through the router. ie will it spot
> bottlenecks with good accuracy?
yes that's the idea.
> any feedback is welcomed,
> regards will.
Also note CONFIG_NET_PROFILE=Y which writes more network specific
profile data to /proc/net/profile, which you'll have to figure
out how to parse.
Also I think it was reported that there were some problems
with profiling (missing symbols) around 2.5.8? I don't know
whether it's been fixed.
Also I don't think you can profile modules, but there was a patch...
http://marc.theaimsgroup.com/?l=linux-kernel&m=101663078100596&w=2
Padraig.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question:kernel profiling and readprofile
2002-05-23 14:05 ` Padraig Brady
@ 2002-05-23 14:17 ` Richard B. Johnson
2002-05-23 15:24 ` Randy.Dunlap
1 sibling, 0 replies; 4+ messages in thread
From: Richard B. Johnson @ 2002-05-23 14:17 UTC (permalink / raw)
To: Padraig Brady; +Cc: will fitzgerald, linux-kernel
On Thu, 23 May 2002, Padraig Brady wrote:
> will fitzgerald wrote:
> > hi all,
> >
> > i stumbled accross a command called readprofile by accident and found
> > that by appening the line append="profile=2" to the lilo.conf file
> > and using thread profile command you can get statistics on functions
> > that spend a certain amount of time doing a job.
> >
> > i done some searching on this and can't find anything other than a
> > man page on readprofile.
> >
> > can anyone tell me what does the line append="profile=2" actually do
> > apart from creating the file profile in the proc directory, what is
> > the 2 for in this line?
>
> The level. see linux/Documentation/kernel-parameters.txt
> Also worth looking at is http://oss.sgi.com/projects/kernprof/
>
> > next is this an accurate way to measure heady traffic load through
> > say a linux router?
>
> I presume you don't want to actually measure traffic throughput
> as there are obviously other ways to do this.
>
> > will it highlight all functions say for example
> > ip_forward, dev_queue_xmit etc etc that are being opverloaded due to
> > huge traffic loads being passed through the router. ie will it spot
> > bottlenecks with good accuracy?
>
> yes that's the idea.
>
> > any feedback is welcomed,
> > regards will.
>
> Also note CONFIG_NET_PROFILE=Y which writes more network specific
> profile data to /proc/net/profile, which you'll have to figure
> out how to parse.
>
> Also I think it was reported that there were some problems
> with profiling (missing symbols) around 2.5.8? I don't know
> whether it's been fixed.
>
> Also I don't think you can profile modules, but there was a patch...
> http://marc.theaimsgroup.com/?l=linux-kernel&m=101663078100596&w=2
>
> Padraig.
FYI, you can do a low-overhead profile on a Linux router just by
recording the network-card interrupts-per-time-unit. All done in
low-overhead user-mode. This assumes that your network-card IRQ
is not shared.
If the interrupts/time get above some level, you then alter routes,
bring other routers on-line, etc. Or in the case of Samba servers, shut
them down on heavy-beaten machines and start them up on others.
This load-balancing works. Actually, you shut-down the Samba Name server
so you don't disconnect existing clients, but new clients go to an
alternate machine.
The metering for all kinds of automatic reconfiguration can be
done on the basis of interrupts/second and it works quite well.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
Windows-2000/Professional isn't.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question:kernel profiling and readprofile
2002-05-23 14:05 ` Padraig Brady
2002-05-23 14:17 ` Richard B. Johnson
@ 2002-05-23 15:24 ` Randy.Dunlap
1 sibling, 0 replies; 4+ messages in thread
From: Randy.Dunlap @ 2002-05-23 15:24 UTC (permalink / raw)
To: Padraig Brady; +Cc: will fitzgerald, linux-kernel
On Thu, 23 May 2002, Padraig Brady wrote:
| will fitzgerald wrote:
| > hi all,
| >
| > i stumbled accross a command called readprofile by accident and found
| > that by appening the line append="profile=2" to the lilo.conf file
| > and using thread profile command you can get statistics on functions
| > that spend a certain amount of time doing a job.
| >
| > i done some searching on this and can't find anything other than a
| > man page on readprofile.
| >
| > can anyone tell me what does the line append="profile=2" actually do
| > apart from creating the file profile in the proc directory, what is
| > the 2 for in this line?
|
| The level. see linux/Documentation/kernel-parameters.txt
| Also worth looking at is http://oss.sgi.com/projects/kernprof/
or what readprofile calls the 'step' size, but the kernel parameter
is actually a shift value (1 << prof_shift), so it is the power-of-2
bucket size for each profiled bucket (all resident kernel code).
profile=2 means step (or bucket size) = 2^2 = 4 bytes per
profile counter. Fairly fine-grained so it can pinpoint
code/functions fairly well.
profile=4 means step size of 2^4 = 16 bytes. Uses less profile
buffer memory in the kernel.
| Also I don't think you can profile modules, but there was a patch...
| http://marc.theaimsgroup.com/?l=linux-kernel&m=101663078100596&w=2
Thanks for that link. I'm interested in that.
--
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-05-23 15:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-23 13:21 Question:kernel profiling and readprofile will fitzgerald
2002-05-23 14:05 ` Padraig Brady
2002-05-23 14:17 ` Richard B. Johnson
2002-05-23 15:24 ` Randy.Dunlap
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.