Home » RDBMS Server » Server Administration » Need help on resizing log buffer
Need help on resizing log buffer [message #167401] Wed, 12 April 2006 17:13 Go to next message
dbawannabe
Messages: 3
Registered: April 2006
Junior Member
We have a database(Oracle 10g Release2) that has a log_buffer of 15M. I want to resize this to 5M. I used alter system to set the new value for the log buffer. I re-started the database. I queried the log_buffer size using show parameters command, the log_buffer is still 15M! Although the spfile is showing 5M. I even created a pfile from the spfile (made sure that the log_buffer parameter is set to 5M) and restart the database using the pfile. It still didn't work! What's going on? Any help is highly appreciated. Thanks!
Re: Need help on resizing log buffer [message #167405 is a reply to message #167401] Wed, 12 April 2006 17:51 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>> that has a log_buffer of 15M.I want to resize this to 5M
WOW.
Is there any rationale that anyone could have applied to have such a log_buffer value? Did you measure anything? Where there any specific wait events reported?
Rarely a database needs a log_buffer more than 1Mb (Optimal in many cases is 512k. But let us not generalize anything here).
Because, the contents of log buffer are flushed every 3 seconds or after every commit or when it gets full to some threshold.
So the real question is , does the database generate/handle more than 1 Mb worth records every 3 seconds?
To answer your question, 10g by default uses SPFILE.
Did you update the SPFILE?
Post what you did.

Regards~
Re: Need help on resizing log buffer [message #167409 is a reply to message #167405] Wed, 12 April 2006 18:42 Go to previous messageGo to next message
dbawannabe
Messages: 3
Registered: April 2006
Junior Member
We we're wondering about where that 15M came from too. We just noticed that the log buffer wait times are huge and when we checked the log_buffer size, it's 15M. Anyway, the issue here is not being able to resize the log_buffer. Yes, I know that 10g uses spfile that's why that's the first thing that I changed:

alter system set log_buffer=5242880 scope=spfile;

System was altered successfully. I then shutdown the database and start it again.

On sqlplus and Enterprise Manager, log_buffer is showing 15M. I opened spfile from the Enterprise Manager, log_buffer is changed to 5M. So, the spfile is updated but it didn't apply to memory.

So, I thought maybe it's not reading the spfile. I then created a pfile(init.ora) from the spfile and made sure that log_buffer in the init.ora is changed to 5M. I shutdown the database again and then start it using the init.ora file. I still got the same result, log_buffer is still 15M.

[Updated on: Wed, 12 April 2006 19:03]

Report message to a moderator

Re: Need help on resizing log buffer [message #167460 is a reply to message #167405] Thu, 13 April 2006 03:20 Go to previous messageGo to next message
JSI2001
Messages: 1016
Registered: March 2005
Location: Scotland
Senior Member
Quote:

when it gets full to some threshold.

The threshold is 1M full.
Jim
Re: Need help on resizing log buffer [message #167503 is a reply to message #167409] Thu, 13 April 2006 07:09 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
quoting documentation:

LOG_BUFFER
Property 	 Description
-------------------------------------------------------------------
Parameter type 	 Integer
Default value 	 512 KB or 128 KB * CPU_COUNT, whichever is greater
Modifiable 	 No
Range_of_values  Operating system-dependent
Basic 	         No

Long story short, LOG_BUFFER is no longer modifiable and is dependent on hidden parameter _ksmg_granule_size.
There are several related bugs reported on this. Please check metalink. One of the notable bug is a documentation error stating the default value calculation (as shown above). Parameter _ksmg_granule_size plays a major role here.

[Updated on: Thu, 13 April 2006 07:15]

Report message to a moderator

Re: Need help on resizing log buffer [message #167539 is a reply to message #167503] Thu, 13 April 2006 12:00 Go to previous message
dbawannabe
Messages: 3
Registered: April 2006
Junior Member
Thank you so much for the information. I'll go and check metalink.
Previous Topic: generic connectivity
Next Topic: Disabling "SYS" id in 9i
Goto Forum:
  


Current Time: Fri Sep 20 14:25:40 CDT 2024