Skip to main content

Questions tagged [profiling]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
8 votes
1 answer
1k views

Does mtrace() still work in modern distros?

tldr: Does mtrace still work or am I just doing it wrong? I was attempting to use mtrace and have been unable to get it to write data to a file. I followed the instructions in man 3 mtrace: t_mtrace.c:...
TopherIsSwell's user avatar
0 votes
1 answer
99 views

Which tools for micro-benchmarking?

I'm not sure which tool to use for micro-benchmarking a C program. I would like to measure both: Memory usage, RSS ( Resident Set Size ) CPU cycles I did use perf record -g and perf script piped ...
jinTgreater's user avatar
0 votes
1 answer
115 views

How to measure mmap I/O latency?

I have an application which appears to be slowing/blocking at the same time there's a lot of disk I/O going on, so I suspect it's I/O operations within the application which are blocking. I can't ...
phemmer's user avatar
  • 72.3k
0 votes
0 answers
22 views

Are there any Linux libraries/package that allow to profile a java application with using profiling tools like visualvm etc?

I have to find the time spent in a method or the current method being executed in java program with out connecting to profiling tools like visualvm or jconsole. Are there any such libraries in Linux ...
samshers's user avatar
  • 688
1 vote
0 answers
167 views

How do I report the max RSS of a cgroup?

I would like to monitor the peak RSS a cgroup has used since it was created. By "peak RSS" I mean: the sum of all processes' RSS at the point in time where that sum is the greatest. I ...
Lawrence Wagerfield's user avatar
2 votes
1 answer
225 views

How can I profile virtual memory accesses made in user mode and kernel mode?

I would like to generate a log of all virtual memory accesses performed in user mode and kernel mode as a result of running some program. Besides collecting memory access locations, I also want to ...
bryantcurto's user avatar
2 votes
1 answer
267 views

How do I profile a real world application?

I run Debian 10 and since two weeks or so the PDF reader Atril (a fork of Evince) takes 25 seconds to start. Previously it started almost instantly. Now I'm trying to find out what causes the delay. I ...
August Karlstrom's user avatar
0 votes
1 answer
457 views

thread profiling and monitoring

how can I get lock time values specifically of the threads of any process? in linux.. I was using the command /proc/pid/stat but I am unable to determine which values are of lock time.
I192100 Mayra Ahmad's user avatar
3 votes
1 answer
1k views

Strace shows that the time spent in syscalls is much longer than the total time elapsed. Why?

I am running an AI inference program based on Tensorflow-gpu. By running /usr/bin/strace -c -f /usr/bin/time ./program, I got the following output: <my program's output> 367.91user 1032.14system ...
Azuresonance's user avatar
4 votes
0 answers
380 views

What are profiling tools available for bash/shell script

I have a project which is entirely written in shell scripts. I find some of the modules in my code takes a lot of time, I need to reduce it functionality wise. What are profiling tools available for ...
Ragini Dahihande's user avatar
1 vote
0 answers
362 views

How can I measure time spent in child processes?

I have a command which invokes another command (synchronously) a couple of times. Is there a way to get the total time spent in the subcommand? In other words, is there a command similar to time but ...
August Karlstrom's user avatar
3 votes
4 answers
2k views

How to profile wall-clock time?

In my program, real time duration is sometimes as much as 3 times that of cpu time. This is a single thread application that does a lot of memory allocation and NFS base read/write. So my doubt is ...
amisax's user avatar
  • 3,025
1 vote
0 answers
398 views

How to take stack samples using `perf` based on wall-clock time

I am trying to use Linux's perf_events framework to investigate an issue with an application on one of our servers. Based on my reading about the perf tool, collecting stacks is relatively ...
zac's user avatar
  • 111
0 votes
0 answers
626 views

High-frequency performance counter sampling using perf record/report

I want to retrieve performance counter counts at a high frequency (i.e. 100-200Hz) using the perf tool (similar in functionality to https://github.com/RRZE-HPC/likwid/wiki/likwid-perfctr#the-timeline-...
Justin Borromeo's user avatar
1 vote
2 answers
753 views

profiling a linux command to get metrics

I am trying to unzip a huge .gz file. I would like to know if there is a way we could profile this command to get the CPU utilization while the command is executing I am looking for something like ...
wandermonk's user avatar
1 vote
1 answer
134 views

Profiling a Linux box to find causes of slowness

I use a (Fedora) Linux box for daily work, and generally I boot it every morning, so we are not talking about long running processes and short uptimes. Lately I noticed that the system got slow, but ...
AkiRoss's user avatar
  • 623
1 vote
0 answers
525 views

Perf tool, used for profiling, crashes on heavy load

When I am using "perf record -F 99 -g -p -- sleep 300" during average load, I am getting the perf.data file without any problem. But when the load is high, it is crashing. The only way to get an ok ...
kaevin's user avatar
  • 19
1 vote
0 answers
66 views

python web application with very different cpu load on two identical virtual machines (Linux)

I have two virtual machines, call them A and B. Both images have Ubuntu 18.04 with kernel 4.15.0-66-generic #75-Ubuntu SMP, x64 arch, 1 core Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz; A has 2 GB ...
mrtexaz's user avatar
  • 135
4 votes
1 answer
705 views

Tracing and timing every step of the initialization of the shell

The following command gives me the full trace of steps zsh -i -c -x exit > trace 2>&1 I'd love for it to also capture, next to each exact step (e.g. as a first column), how long that step ...
Amelio Vazquez-Reina's user avatar
1 vote
1 answer
26 views

Code Profiling with frequent restarts

I'm looking for a code profiler which is somewhat tolerant of the fact that our application starts and stops rather frequently. In other words, suppose my application is: int main() { ...
BarkerChippy's user avatar
0 votes
2 answers
58 views

Is it possible to list everything a specific process is trying to do? [duplicate]

I have a web app in a jboss application server that gives a not understandable error. I’m 100% sure it is because it is trying to access a forbidden file system location. Is it possible to profile ...
Phate's user avatar
  • 329
13 votes
1 answer
10k views

Security implications of changing “perf_event_paranoid”

I'd like to use the perf utility to gather measurements for my program. It runs on a shared cluster machine with Debian 9 where by default the /proc/sys/kernel/perf_event_paranoid is set to 3, ...
Martin Ueding's user avatar
1 vote
0 answers
23 views

Timestamp retrived with `date -r file` does not fit the time order of commands [duplicate]

I was playing around with the command date to create timestamps and profile the execution of a script. I decided to set four of them, named t1 through t4. For t2 I created an empty file whose last ...
XavierStuvw's user avatar
  • 1,139
0 votes
1 answer
202 views

functions folder in trace_stat folder of ftrace

I am learning ftrace, I read from the following link that I can enable function profiling using the 'function_profile_enabled' file. mount -t tracefs nodev /sys/kernel/tracing cd /sys/kernel/tracing ...
md.jamal's user avatar
  • 291
0 votes
2 answers
924 views

Is there a way to predict or count the number of page faults?

I am working on hardware performance counter (HPCs) and I seek to use these counters to measure some events accurately. I have found that the non-determinism in hardware performance counter (...
husin alhaj ahmade's user avatar
3 votes
0 answers
780 views

Perf Tool monitoring by PID

I'm using linux perf tool to monitor the performance of some processes. The documentation tells that you can flag it to collect profiles on per-thread, per-process and per-cpu basis. I get that the ...
Nikhilesh Singh's user avatar
3 votes
0 answers
330 views

How can I pause/suspend a running valgrind (with callgrind) instance?

I have some rather chunky piece of software being profiled via valgrind --tool=callgrind MySoftware (bash at Ubuntu 16.04 if it makes any difference). It was running overnight, but still hasn't ...
BIOStheZerg's user avatar
2 votes
0 answers
463 views

How can I find the deepest and most stack-hungry call chains in a program?

I have a program written in OCaml that tends to stack-overflow on platforms with small stacks. Rather than ulimiting the program to find and solve stack overflows one by one, I'd like to get a sorted ...
Clément's user avatar
  • 612
3 votes
0 answers
317 views

How can I tell if my GPU is a bottleneck?

I already know of utilities like htop that can be used to (roughly) tell if a process is primarily bottlenecking at disk read/write speeds, network IO, not being parallel, or being parallel but ...
Vivian's user avatar
  • 317
4 votes
1 answer
3k views

Faster startup of zsh [closed]

I love tmux, but whenever I need to create a split with a new pane or a new window it has to run my zsh init scrips and .profile, etc. And they take about a few seconds to run. Initializing stuff like ...
iLemming's user avatar
  • 533
1 vote
1 answer
444 views

Trying to decode mp3 file on NVIDIA Tesla K20c GPU on RHEL 6.6

I am trying to use mpg123 to play a mp3 file but am struggling to do it on a GPU. Upon doing a lot of research, the closest command I found for my requirement was: mplayer -vo vdpau and -vc ...
a_sid's user avatar
  • 247
1 vote
2 answers
2k views

What is the Linux equivalent of Mac OS X's "Sample Process"?

On Mac OS X, you can "sample" a process, which takes a backtrace of every thread in a specified process a specified number of times and then displays what methods are running (Apple man page, example ...
A. Wilcox's user avatar
  • 274
6 votes
1 answer
2k views

Record time of every process or thread context switch

I'm trying to get the nearest to real-time processing I can with a Raspbian distribution on a Raspberry Pi for manipulating its GPIO pins. I want to get a "feel" for the kind of performance I can ...
Jodes's user avatar
  • 227
2 votes
1 answer
588 views

performance comparison of multiple commands excutions

I've got three different programs written in three different languages, and I'm trying to compare their performance in terms of runtime, and memory consumption. What I'm looking for is some command ...
7kemZmani's user avatar
  • 121
1 vote
0 answers
105 views

Performance problem Fedora 23 32-bit @ Dell D630 4GB/Nvidia

I have installed Fedora 23 32-bit at Dell D630 4GB with NVidia Quattro NVS 135M (nvidia.ko, not nouveau.ko). And I have permanent performance problem as X-Windows (Gnome) are very slow and laggy. I ...
TMa's user avatar
  • 111
2 votes
0 answers
232 views

Benchmarking under SELinux Sandbox with Phoronix Test Suite

I would like to run the Phoronix Test Suite 6.2.2 under the SELinux sandbox on Fedora 23, but I can't execute it using $ sandbox ./phoronix-test-suite. I probably don't have the correct SELinux type. ...
Slazer's user avatar
  • 123
1 vote
0 answers
229 views

CPU usage according to ps and operf

I've acquired some data seemingly in conflict from two sources one would assume are reliable. In all likelihood, I'm misreading one of the sources. The server environment is: Ubuntu 14.04.2 LTS, 3.13....
pdm's user avatar
  • 165
-4 votes
1 answer
4k views

How to determine the CPU time of the execute of Makefile in linux or Unix? [closed]

below is my Makefile using to execute my numerical code.I would like to know the time taken by the CPU to execute these C programmes. #Makefile LDFLAGS = -DN_DIM=3 #LDFLAGS = -DN_DIM=3 -...
prakash's user avatar
7 votes
1 answer
2k views

How to get the GPU execution time of a script in the shell?

I would like to display the completion time of a script, in terms of GPU time (not CPU). For the CPU, I can simply use time: francky@gimmek80s:~$ time ls -l total 8 drwxrwxr-x 3 francky francky 4096 ...
Franck Dernoncourt's user avatar
5 votes
0 answers
2k views

Memory consumption over variable period of time

There are a number of questions on this StackExchange about memory consumption, notably: How to check which process is using most memory How to display top results sorted by memory usage in real ...
blong's user avatar
  • 209
4 votes
0 answers
2k views

Print kernel memory layout

Userland memory layout can be inspected by looking into /proc/self/maps. I am wondering if there is a similar facility allowing to inspect runtime kernel memory layout?
Richard's user avatar
  • 879
2 votes
0 answers
153 views

Which process wrote to which memory address? [closed]

Recently, I've been seeing a wide variety of memory-related crashes at work (C++ applications on Ubuntu 14.04). Our applications use a properietary third party library to interface with real time data ...
pdm's user avatar
  • 165
1 vote
0 answers
755 views

How can I find which process is eating my memory? [duplicate]

My Linux system sometimes reaches 90% memory usage. We are running some Java processes, and top shows overall usage as 45%. If I stop the running processes, usage reduces to 5-10%. I want to list ...
RAVITEJA DUVVA's user avatar
1 vote
0 answers
985 views

Profiling memory, disk, cpu, and time from python

I have a workflow, implemented in python, and I would like to profile memory, disk (IO), cpu, and time information in python in an unobtrusive manner. This is NOT a question of profiling code, but ...
seandavi's user avatar
  • 241
5 votes
1 answer
540 views

Is there a mock program that uses the CPU on multiple cores?

I am playing around with htop, gprof, etc. I'd like a program that basically just runs on multiple cores so I can profile it and learn how to use these tools. I know I can write my own c++ code with -...
quant's user avatar
  • 4,171
2 votes
1 answer
2k views

Difference between maximum resident set size as reported by /usr/bin/time vs. getrusage?

I ran the command a.out like this: $ /usr/bin/time -f"%M" ./a.out a.out also uses the function getrusage() and prints: printf("%ld",ru.ru_maxrss); where the first ru is the struct. When I run it,...
Dervin Thunk's user avatar
  • 3,589
3 votes
1 answer
72 views

program executing for 2 days

I have a java program which implements the Hungarian algorithm. I made changes to the existing code in such a way that the input is read from file. I have a pretty huge input around 32,000 rows for ...
Ramesh's user avatar
  • 39.7k
1 vote
1 answer
1k views

Does perf includes some "graphing" abilities?

It's possible to create a bitmap or a vector image out of the data collected by the perf profiler under linux ?
user2485710's user avatar
  • 1,543
3 votes
0 answers
938 views

What is the difference between the output of TOP command and Oprofile?

In the top command one of the processes is always showing a CPU usage of 4 to 5%. But in oprofile the CPU usage is 0.004%. I do not understand this. And I also noticed that even when a process is in ...
New to Rails's user avatar
3 votes
1 answer
3k views

Understanding Perf tool output

I recently installed Perf tool On my platform and wanted to use it for profiling my platform. I started profiling a standalone application. Below is the command I used: perf start ./helloworld ...
Ram's user avatar
  • 665