Re: PL/SQL Native Compilation 11g - slower not faster :(

From: Steve Baldwin <stbaldwin_at_multiservice.com>
Date: Fri, 23 Apr 2010 06:58:01 +1000
Message-ID: <u2ud282b3ab1004221358ubd6aee33hf09dc14a6f1af0f9_at_mail.gmail.com>



Dave,

I think your expectations are reasonable however my observations are similar.  I actually had a case where the compiled code ran many times slower than interpreted (> 100 times slower).  However this was due to a platform specific bug in
dbms_utility.format_call_stack which we were using to trap and log errors. This has been ack'd by Oracle (bug 9260868) but I don't expect it to be fixed any time soon.

There should still be some minor improvement in timings however. Can you isolate the slowdown to a specific procedure or is that not practical? When you say it is CPU bound, is that because you know it is not doing database access, or because you are not seeing excessive disk activity? Is it possible the CPU intensive activity is related to parsing queries rather than executing procedural code? If you know it is executing procedural code, what sort of activity is it doing - string manipulation, array processing, ...?

Steve

On Fri, Apr 23, 2010 at 6:12 AM, David Mann <dmann99_at_gmail.com> wrote:
>
> I have been working with a developer on tuning some CPU intensive PL/SQL procedures. We are on 11.1.0.7/Solaris/64-bit Sparc processors. After fixing up some inefficient SQL in the code we did some baseline testing and confirmed that the processing is CPU bound. We are happy with the speed of our code now but more headroom is always nice, we were hoping for a last minute speed boost before we release the code by compiling the PL?SQL Natively instead of leaving it Interpreted.
>
> After setting DB parameters and using DBMSUPGNV and UTLRP to recompile PL/SQL modules we re-ran our benchmarks. Timings are coming out to be slightly slower than interpreted (a minute or two slower on a 60 minute processing run).
>
> This is my first time actually using Native compilation and did not expect to see this running slower than interpreted. Everything we had read had me expecting to see faster runtimes or worst case running at the same speed as the old code, definitely not slower.
>
> Just wondering if anyone else on list has seen any similar behavior (either on our platform or another one).
>
> -Dave
>
> --
> Dave Mann
> www.brainio.us
> www.ba6.us - Database Stuff - http://www.ba6.us/rss.xml
</pre><hr>
<div style="font-size: 12px; color: #666666;"> This email is intended solely for the use of the addressee and may contain information that is confidential, proprietary, or both. If you receive this email in error please immediately notify the sender and delete the email. </div>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Apr 22 2010 - 15:58:01 CDT

Original text of this message