Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle hidden costs revealed, Part2 – Using DTrace to find why writes in SYSTEM tablespace are slower than in others | Tanel Poder Consulting #35

Open
utterances-bot opened this issue Feb 6, 2024 · 5 comments

Comments

@utterances-bot
Copy link

Oracle hidden costs revealed, Part2 – Using DTrace to find why writes in SYSTEM tablespace are slower than in others | Tanel Poder Consulting

_I have written two posts in one, about a performance issue with writes in system tablespace and introduction of a little DTrace stack sampling script.
_
Have you noticed that DML on tables residing in SYSTEM tablespace is slower than tables in other tablespaces?
Here’s an example, I’ll create two similar tables, one in USERS tablespace, other in SYSTEM, and inset into the first one (Oracle 10.2.0.3 on Solaris x64):
SQL> create table t1(a int) tablespace USERS;
Table created.
SQL> create table t2(a int) tablespace SYSTEM;
Table created.
SQL> exec for i in 1..100000 loop insert into t1 values(i); end loop;
PL/SQL procedure successfully completed.
Elapsed: 00:00:03.09
Insert into table in USE

https://tanelpoder.com/2008/09/02/oracle-hidden-costs-revealed-part2-using-dtrace-to-find-why-writes-in-system-tablespace-are-slower-than-in-others/

Copy link

Hello Sir,

getting error while using dstackprof.sh ..... kindly help

[root@*-mgt dtrace]# ./dstackprof.sh 32545

DStackProf v1.02 by Tanel Poder ( http://www.tanelpoder.com )
Sampling pid 32545 for 5.000 seconds with stack depth of 100 frames...

dtrace: invalid probe specifier
profile-1001
/pid == $target/ {
@U[ustack(100)] = count();
@k[stack(100)] = count();
}
tick-1sec
/i++ >= 5.000/ {
exit(0);
}
END {
printa(@U);
printa(@k);
}
: floating-point constants are not permitted
0 samples with stack below

@tanelpoder
Copy link
Owner

tanelpoder commented Feb 6, 2024

Interesting... I guess the /i++ >= 5.000 { part is causing trouble (should be just 5 not 5.000). I guess the 5.000 comes from the shell somehow - the default seconds is 5, but the .000 gets added somewhere if using default values.

If you specify the number of seconds to sample on command line, what happens:

./dstackprof.sh 32545 5

Btw what OS and exact version is this? I wrote and tested this script over 16 years ago on Solaris :-)

@somroy31883
Copy link

somroy31883 commented Feb 6, 2024 via email

@tanelpoder
Copy link
Owner

Thanks for the kind words. I wrote this script for Solaris and haven't even tested on Linux. Oracle's DTrace on Linux wasn't as fully functional back when I tested it (years ago). By now, latest Oracle's DTrace 2.0 on Linux uses eBPF as a tracing backend anyway - so I suggest you learn what BPF tools can offer you in Linux world instead. A good starting point is https://brendangregg.com/ebpf.html . He has an entire book on the subject too.

@somroy31883
Copy link

somroy31883 commented Feb 7, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants