Operating System - HP-UX
1827465 Members
4583 Online
109965 Solutions
New Discussion

Kernel tuning for buffer cache did not succeed.

 
RAC_1
Honored Contributor

Kernel tuning for buffer cache did not succeed.

I did kernel tuning to tune dbc_max_pct and dbc_min_pct.
Did it as follows.

cd /stand/build
system_prep -V -s ./system
kmtune -s dbc_max_pct=10 -S ./system
kmtune -s dbc_min_pct=5 -S ./system
mk_kernel -s ./system
cp /stand/system /stand/system.prev
cp /stand/vmunix /stand/vmunix.prev
mv ./system /stand/.
kmupdate ./vmunix_test
cd /
shutdown -ry 0

Now if I do sysdef or echo dbc_max/min_pct/D | adb -k /stand/vmunix /dev/kmem, I get old values and not new ones. Glance -m also reports old buffer cache value.

kmtune -lq dbc_max/min_pct -S /stand/system reports changed values.

Now I am clueless on what could have caused this???
I am on 11.0

Anil
There is no substitute to HARDWORK
24 REPLIES 24
Sanjay_6
Honored Contributor

Re: Kernel tuning for buffer cache did not succeed.

Why don't you do this through sam rather than all doing it in this manner.

when there are easy ways to do something, use it.

Hope this helps.

Regds
RAC_1
Honored Contributor

Re: Kernel tuning for buffer cache did not succeed.

Agree Sanjay,

But I have been doing the kernel tuning like this and never ran into something like this.

Agree that SAM is good to such things, but I am curious to know, what would have caused this??

Anil
There is no substitute to HARDWORK
Navin Bhat_2
Trusted Contributor

Re: Kernel tuning for buffer cache did not succeed.

Are you sure you are booted off the correct kernel? on the right disk?
RAC_1
Honored Contributor

Re: Kernel tuning for buffer cache did not succeed.

Yes, I booted off the right kernel and right disk.

the strange thing is that kmtune reports the values I set.
kmtune -lq dbc_max/min_pct and
kmtune -lq dbc_max/min_pct -S /stand/system reports the values I set(10 and 5 %)

But

echo dbc_max/min_pct/D|adb -k /stand/vmunix /dev/kmem reports old values and sysdef also reports old values.

Also the old kernel and current kernel is same.

-rwxr-xr-x 1 root sys 13969656 May 24 06:25 /stand/vmunix
-rwxr-xr-x 1 root sys 13969656 Oct 3 2002 /stand/vmunix.prev

Don't know what could have caused this??
There is no substitute to HARDWORK
Navin Bhat_2
Trusted Contributor

Re: Kernel tuning for buffer cache did not succeed.

Also could someone one have been building a new kernel at the same time you finished your build? I know it is a shot in the dark but hey who knows? :)
Geoff Wild
Honored Contributor

Re: Kernel tuning for buffer cache did not succeed.

Okay - what does it look like when you go into SAM - are the new values listed or old?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
RAC_1
Honored Contributor

Re: Kernel tuning for buffer cache did not succeed.

For Navin,

I am sure, I was the only one building the kernel at that time.

Geoff,

SAM is listing old values..

Clueless.......
There is no substitute to HARDWORK
Navin Bhat_2
Trusted Contributor

Re: Kernel tuning for buffer cache did not succeed.

Not sure I understand this.Think I am missing something. After you did a mk_kernel you did a

cp /stand/system /stand/system.prev
cp /stand/vmunix /stand/vmunix.prev

why is the /stand/vmunix.prev showing a timestamp of Oct 2002? Is this output before you built the kernel?


>>Also the old kernel and current kernel is same

rwxr-xr-x 1 root sys 13969656 May 24 06:25 /stand/vmunix
-rwxr-xr-x 1 root sys 13969656 Oct 3 2002 /stand/vmunix.prev
Geoff Wild
Honored Contributor

Re: Kernel tuning for buffer cache did not succeed.

Will system_prep work right with ./ ?

I thought you had to:

cd /stand/build
/usr/lbin/sysadm/system_prep -v -s system

Same for kmtune - no need to state ./ the default is /stand/system

kmtune -s dbc_max_pct=10
kmtune -s dbc_min_pct=5

So, in conclusion - I believe your changes are in /stand/build/system but not in /stand/system

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sridhar Bhaskarla
Honored Contributor

Re: Kernel tuning for buffer cache did not succeed.

Anil,

You better try with

mk_kernel -o /stand/vmunix -s ./system

Otherwise see below from the man page on what happens.

//
If the -o option is not specified, the kernel file and kernel function
set directory remain in the working directory.
//


-Sri
You may be disappointed if you fail, but you are doomed if you don't try
RAC_1
Honored Contributor

Re: Kernel tuning for buffer cache did not succeed.

Navin,

After mk_kernel, I just copied previously running kernel as vmunix.prev so that I could use it later on if need arises.

I do see any problem with that.

Anil
There is no substitute to HARDWORK
Navin Bhat_2
Trusted Contributor

Re: Kernel tuning for buffer cache did not succeed.

Hi Anil,
I am confused because of the timestamp if you did a cp not a mv then the timestamp should be current right? But your output shows Oct3 2002.




Sridhar Bhaskarla
Honored Contributor

Re: Kernel tuning for buffer cache did not succeed.

.. To confirm the problem with not specifying -o option, cd /stand/build and you should see vmunix there. If so, do

echo "dbc_max_pct/D" |adb -k /stand/build/vmunix /dev/kmem

and it should display new values with warnings.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
RAC_1
Honored Contributor

Re: Kernel tuning for buffer cache did not succeed.

Geoff,

I do not think that ./system or system would make difference.

Shridhar,
mk_kernel -o /stand/vmunix
If I use -o options, does it mean that I do not need to kmupdate??
I used mk_kernel -s ./system
and then kmupdate ./vmunix_test

Bellow is the man page -o option details.

-o pathname
Specify the target file path. The created kernel file,
vmunix_test, is moved from the build directory to the path
specified by the option argument. The associated kernel function
set directory, dlkm.vmunix_test, is moved to the same destination
directory.

If the default kernel, /stand/vmunix, is specified or the -o
option is not specified, the created kernel file does not replace
/stand/vmunix and remains as vmunix_test.

The kernel file and associated kernel function set directory are
automatically moved to /stand/vmunix and /stand/dlkm during
either shutdown or startup.


Anil
There is no substitute to HARDWORK
John Dvorchak
Honored Contributor

Re: Kernel tuning for buffer cache did not succeed.

Everything you did looks good to me. So all I can think of is maybe you fat fingered one of the commands.

Are you absolutely sure that your kmtune -s dbc_max_pct=10 -S ./system was not fat fingered and didn't actually update the /stand/build/system file? That is about the only thing that I can think of that could cause what your are seeing. Verify by looking at /stand/system and making sure your params are in there.

One other thing is the mk_kernel -s if you fat fingered that one it would use the old /stand/system file instead of the new one, but you mv ./system /stand/. would certainly over write the old one.

Good luck, and I know it's been said about a million times, but this is one of the few things I use SAM for and that is because I've never had a problem with a SAM kernel tune.

Good luck
If it has wheels or a skirt, you can't afford it.
G. Vrijhoeven
Honored Contributor

Re: Kernel tuning for buffer cache did not succeed.

Hi Anil,

The kmtune -lq dbc_max/min_pct -S /stand/system
take takes the values listed in /stand/system. This does not have to be the value in the kernel.
This does not explain why the kmupdate did not work...

HTH,

Gideon
Sridhar Bhaskarla
Honored Contributor

Re: Kernel tuning for buffer cache did not succeed.

Anil,

I normally use mk_kernel with -o option so that kmupdate is automatically invoked. I have a tendency to forget kmupdate time to time.

Yours should have worked provided if you didn't miss any steps. Do you still see if you have vmunix_test under build directory?.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
RAC_1
Honored Contributor

Re: Kernel tuning for buffer cache did not succeed.

I am clueless.

As navin said, I really do not remember, did I move or cp vmunix file.

For Shridhar

I never used -o option.

OR may be As John said, somewhere fat finger syndrome affected me.
Doing it through SAM now.

Points are coming.

Anil
There is no substitute to HARDWORK
Navin Bhat_2
Trusted Contributor

Re: Kernel tuning for buffer cache did not succeed.

Hello Anil,
I followed your exact steps and had no problem at all. All the values are just fine. previous values were 10 and 5 changed values are 11 and 6.

:[/stand/build]>/usr/lbin/sysadm/system_prep -V -s ./system
Usage: system_prep [-v] [-k ] [-s ]

:[/stand/build]>/usr/lbin/sysadm/system_prep -v -s ./system
NOTE: The template file has been extracted from "/stand/vmunix"
It has been placed in "./system" where it will be used
to build a new kernel.

:[/stand/build]>

:[/stand/build]>kmtune -s dbc_max_pct=10 -S ./system

:[/stand/build]>kmtune -s dbc_min_pct=5 -S ./system

:[/stand/build]>mk_kernel -s ./system
Generating module: krm...
Compiling conf.c...
Loading the kernel...
Generating kernel symbol table...

:[/stand/build]>cp /stand/system /stand/system.prev

:[/stand/build]>cp /stand/vmunix /stand/vmunix.prev

[/stand/build]>mv ./system /stand/.


[/stand/build]>kmupdate ./vmunix_test

Kernel update request is scheduled.

Default kernel /stand/vmunix will be updated by
newly built kernel /stand/build/vmunix_test
at next system shutdown or startup time.



[/stand/build]>cd /

[/]>shutdown -ry 0

********* after reboot *******


:[/]>echo dbc_max_pct/D|adb -k /stand/vmunix /dev/kmem
dbc_max_pct:
dbc_max_pct: 11

:[/]>echo dbc_min_pct/D|adb -k /stand/vmunix /dev/kmem
dbc_min_pct:
dbc_min_pct: 6

:[/]>ll /stand
total 92528

drwxr-xr-x 3 root sys 2048 Jun 4 12:14 build
-
drwxr-xr-x 5 root sys 1024 Jun 4 12:21 dlkm
drwxr-xr-x 5 root sys 1024 Jan 12 21:04 dlkm.vmunix.prev
drwxr-xr-x 5 root sys 1024 Oct 1 2002 dlkm.vmunix_test

-rw-r--r-- 1 root sys 1004 Jun 4 12:00 system

-rwxr-xr-x 1 root sys 13049488 Jun 4 12:02 vmunix

-rwxr-xr-x 1 root sys 13049504 Dec 10 14:32 vmunix.prev


:[/stand/build]>uname -a
HP-UX B.11.00 A 9000/820 2001548589 two-user license


Navin Bhat_2
Trusted Contributor

Re: Kernel tuning for buffer cache did not succeed.

wrong cut and paste there in kmtune command it was 11 and 6 new values. Restoring back my old kernel now.
RAC_1
Honored Contributor

Re: Kernel tuning for buffer cache did not succeed.

Thanks a lot Navin.

Don't know what went wrong....

Anil
There is no substitute to HARDWORK
Ted Buis
Honored Contributor

Re: Kernel tuning for buffer cache did not succeed.

Is bufpages=0? If I recall correctly, you could have fixed buffer cache, rather than dyanamic if bufpages had a non-zero value. In that case the percentages specified was ignored.
Mom 6
Joy Orton
Occasional Advisor

Re: Kernel tuning for buffer cache did not succeed.

Anil,
Please consider:
With modern disks any Buffer cache above 512MB is lost in overhead.
Not to mention the DBC's are flexable and prone to fragmentation of memory as they grow and shrink.
If you are on san or fiber and have over 4 GB RAM I recommend a buffpages of 0x20000 (512MB) That ram is valuable for other uses.
I see many systems set much to high with modern disks.
RAC_1
Honored Contributor

Re: Kernel tuning for buffer cache did not succeed.

Closed
There is no substitute to HARDWORK