db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dyre.Tjeldv...@Sun.COM
Subject Re: [jira] Commented: (DERBY-2118) Change some boundary checks in ArrayInputStream to ASSERTs to improve performance
Date Tue, 28 Nov 2006 12:00:04 GMT
Knut Anders Hatlen <Knut.Hatlen@Sun.COM> writes:

> "Daniel John Debrunner (JIRA)" <jira@apache.org> writes:
>
>> Also how can these methods take up 1.5% of system time, since they
>> are just modifying instance fields, isn't that all user code?
>
> "Dyre Tjeldvoll (JIRA)" <jira@apache.org> writes:
>
>> Wrt. system cpu: I think that's strange too, but that is what the
>> profiler says. Maybe it is wrong. (it attributes the system cpu (and
>> most of the user cpu too) to the byte code line doing getfield #11,
>> which I think is ArrayInputStream.end
>
> I'm just guessing here, but embedded Derby should use very little
> system CPU (at least for read-only load, all data in page cache and
> only one client, which I assume is the configuration used). 1.5% of a
> number that is very small in the first place, is very close to
> nothing. Since this is some of the code that is executed most
> frequently, background noise might be accumulated there. I don't know
> what that background noise might be, but perhaps cache misses or
> involuntary context switches use system CPU?
>
> Does your profiler say how much of the total CPU time is system time?

No, but you can see the actual seconds measured, and that shows that
you are absolutely correct :) For setPosition() 1.69% user cpu amounts
to 1.85 sec, whereas 1.03% system cpu only amounts to 0.002 sec.

-- 
dt

Mime
View raw message