Need help on strace output

Hi All,
Good day, need some help on strace result. We're encountering oracle Database server connection slowness (using sqlplus login to db server, there have 1 or 2 secs delay) we had generated strace and provide to oracle to investigate, and they told us it look like OS problem (Our OS is Red Hat Enterprise Linux Server release 5.6 (Tikanga). Oracle support told us it is "A slow mmap function should be checked with OS support."

Base on strace, the slowness encounter "mmap" and ..read resumed NTP0"

14729      0.000101 chdir("/usr/oracle_u01/oracle/product/11.2/db_1/dbs") = 0 <0.000019>
14729      0.724313 mmap(NULL, 143360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b6525bd2000 <0.000034>
14729      0.000174 mmap(NULL, 143360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b6525bf5000 <0.000025>
14729      0.000220 mmap(NULL, 143360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b6525c18000 <0.000018>

:
14729      0.000054 fcntl(7, F_SETFD, FD_CLOEXEC) = 0 <0.000017>
14729      0.000052 fcntl(10, F_SETFD, FD_CLOEXEC) = 0 <0.000015>
14729      0.000062 write(10, "NTP0 14729\n", 11) = 11 <0.000025>
14726      0.000059 <... read resumed> "NTP0 14729\n", 64) = 11 <0.794318>
14729      0.000017 fcntl(7, F_SETFD, FD_CLOEXEC) = 0 <0.000048>

I have limited knowledge on strace, would like to learn from you, what does the strace mean. And where I can deep further to find out the root cause for the slowness. Thanks.

Thanks in advance.

Regards,
klng

Here is a wild guess... the box is out of memory probably because oracle ate it all with shared memory segments. I would be using commands like "free", "vmstat" and "ipcs" to check that out.

I have to say that every time I investigate an oracle box running slow it always turns out to be memory shortage.

Hi,
Thanks your sharing, we found the issue was caused by slowness when create oracle background process, we have change some parameter and issue was resolved.

Thanks your sharing.

Regards,
Klng

1 Like

Thank you for reporting back, klng. It's appreciated. If you could provide some details, they may prove helpful to someone in the future.

Regards,
Alister

Hi Alister,

Sorry for not mention the detail, actually this is oracle parameter change, nothing change in OS level.

In Oracle DB (in Linux), we used to enable hugepages for oracle SGA. So we change oracle "PRE_PAGE_SGA" parameter to TRUE.

Base on Oracle Document:
Operating system page table entries are then prebuilt for each page of the SGA. This setting can increase the amount of time necessary for instance startup, but it is likely to decrease the amount of time necessary for Oracle to reach its full performance capacity after startup"

Default parameter is "FALSE", thus we thought to set it to true will improve the performance, but it is NOT.

Actually, the parameter is not regarding the SGA itself, but any process startup. If setting this parameter to true, whenever a process starts, it reads the entire SGA and maps it into its virtual memory space and this is meant to take some time, depending on how memory pages exist in the SGA.

So, we reset oracle PRE_PAGE_SGA parameter to "FALSE" to solve the issue.

Thanks & Best Regards

2 Likes