JL Computer Consultancy

Science and Pseudo-Science.

May 2005

I recently wrote a short, speculative, item about the way in which the cache advice (such as v$db_cache_advice) could be implemented in Oracle. Whilst doing so, I suddenly remembered an email that I had written about v$db_cache_advice a few months ago, and was prompted to check back to see if the contents of the email had persuaded the author of an article on the subject to correct what he had written.

The article in question was about memory usage, and the point that particularly caught my eye was the following graph, which had this introduction:

Oracle Corporation recognizes that monitoring SGA usage ratios and adjusting the size of the SGA regions can have a dramatic impact on system performance, and this is the foundation of Oracle10g Automatic Memory Management (AMM) in which Oracle calculates the point of diminishing marginal return from adding data buffers (refer to figure 2).

There are several questionable assumptions (and one correct one) in the introductory paragraph but the thing that caught my eye particularly was the label on the graph “Second derivative of f(x) = 1/y” which seems to be attached to the arrow that is pointing at a fairly arbitrary point in the graph.á

The graph seems to be a reasonable representation of the mapping “y = 1/x” – which you might choose to describe in two or three different ways depending on where you learnt your mathematics.á f(x) = 1/x,á f:x -> 1/x are possibly alternatives, so the peculiarity of f(x) = 1/y is probably a simple typographical error as the author tried to recall his child-hood classes.

The real puzzle is the reference to the second derivative – what was the author trying to say with this reference to calculus. Fortunately help was at hand, because the author had duplicated this article to a couple of other websites (with some modifications) and I found the following clarification elsewhere:

From the above listing we see that increasing the db_cache_size from 304 meg to 334 meg would result in approximately 700,000 less physical reads.á This can be plotted as a 1/x function and the exact optimal point computed as the second derivative of the function.

So this confirms that the graph was intended to look like y = 1/x; and that the comment about “Second derivative of f(x) = 1/y” was supposed to be associated with the arrow. So this opens up the question – why did the author try to say something about calculus, when he clearly does not understand the topic, and when it adds no value to the article.

For those who don’t remember their high-school calculus too well, the second derivative of a function is a function - in the case of y = 1/x you get y’’ = 2/(x^3) – it is not a point. So you cannot compute an optimal point as “the second derivative of a function”.

Possibly, therefore, the author was struggling with a vague memory about local maxima and minima – the flat points - of graphs. The flat points are the points where the first derivative is zero – in which case the sign of the second derivative can tell you whether the flat point is a local maximum (high) or local minimum (low). If the second derivative is negative you have a local maximum, if the second derivative is positive you have a local minimumá – and if the second derivative is also zero, that leaves you with more work to do.

Is this the thought that the author was trying to express? Possibly, except the first derivative of 1/x is -1/(x^2) which is never zero - or putting it in purely visual terms: the graph of 1/x has no flat points. There is simply nothing you could say about the second derivative of y = 1/x that could help you to determine an “optimal” point on this graph.

So why throw in technical jargon that is not only inappropriate, but also displays an amazing lack of knowledge? Call me cynical, but could it be a bluff, designed to add scientific credibility and weight to the article by trotting out a few technical expression about an area of knowledge that a very large percentage of the population tend to avoid ? Maybe the author thought that the people who didn’t understand calculus would be impressed, and that the people who did understand calculus would not point out the errors

As one who does understand enough calculus to spot the errors, I sent the following email to the author on 4th Sept 2004 (article titles and website names deleted):

I've just been reading your recent article {title deleted} on {website deleted}, and whilst trying to work out what you meant by your reference to 'second derivatives', found your article {title deleted).

The following line is in need of review.
    This can be plotted as a 1/x function and the exact optimal point computed as the second derivative of the function:

The "second derivative" of a function will be a function, not a point. I think you were probably trying to say something about: "where the second derivative of the function = {some value}".

Although I think there is a flaw in your theory - I thought you would at least want to correct the error in the way you have expressed it

In passing - I think it would be easier for people to interpret the graph if you put the buffer size along the horizontal axis, and the resultant I/O up the vertical axis, as this is the usual way to express cause and effect with this type of graph. 

I did not receive a reply and, as you can see, no action has been taken to correct the error in the last eight months.


As a writer, I know that it is very easy to forget that the reader is not necessarily familiar with terms that I use casually. Whenever someone points out that I have (for example) used an unusual mathematical expression that needs to be explained to the lay reader, I consider it to be an error in my writing.

As a reader, you should be cautious about trusting an educational document that uses terms that appear to come from outside the appropriate realm of experience. Sometimes the high-tech jargon is there to impress and dazzle the na´ve reader – not to add value to the article.

Back to Index of Topics