Operating System - HP-UX
1827807 Members
2645 Online
109969 Solutions
New Discussion

Re: how often the OS buffer cache is sync'd.

 
SOLVED
Go to solution
Xavier BLANC
Frequent Advisor

how often the OS buffer cache is sync'd.

HP-UX 11.11 L3000
I have a problem with a Progress DB freezing form time to time This is due to a high number of litle transaction. This produce a flushes during checkpoints.
Progress TechSupport ask me "how often the OS buffer cache is sync'd." and "Ideally you can change this frequency ".
This sound like syncer prog involved.
Can someone help me with this.
Xavier
13 REPLIES 13
Victor BERRIDGE
Honored Contributor

Re: how often the OS buffer cache is sync'd.

Hi Xavier,
Ive seen this type of behaviour on boxes with dbc_max_pct were left to default value (50%) and the boxes had quite some RAM...
What size buffer do you have?
A reasonable size would be no more than 400MB
as you have noticed if it is in need to flush 400MB it will frees during that time...So imagine >2GB...

You could after change the way the JFS log works by adding in /etc/fstab the optins to the filesystems giving you trouble like delaylog,dtatinlog or even mincahe=direct

All the best
Victor
Fred Ruffet
Honored Contributor

Re: how often the OS buffer cache is sync'd.

About Victor's answer :
For Oracle DB I always say that FS where DB Files are should be mounted with mincache=direct and convosync=direct options (both Oracle and HP recommends this). They make IOs bypass the cache for those FS. It should be also true for progress.

Note that these options are only available when having Online JFS installed.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Solution

Re: how often the OS buffer cache is sync'd.

And to anser the question - I believe the syncer flushes to disk every 30 seconds

HTH

Duncan

I am an HPE Employee
Accept or Kudo

Re: how often the OS buffer cache is sync'd.

... and to change the frequency look at /sbin/init.d/syncer and read the man page for syncer (1m)

HTH

Duncan


I am an HPE Employee
Accept or Kudo
Geoff Wild
Honored Contributor

Re: how often the OS buffer cache is sync'd.

From ftp://hprc.external.hp.com/memory.htm


A. Review Buffer Cache size

Review Buffer Cache size - Buffer cache is, by default, 50% of RAM (see kernel parameter dbc_max_pct(5)). A buffer cache sweet spot is 400 Mb or 20% of memory, whichever is smaller. But of course, this may vary from system to system. To check the current size of the buffer cache, either "sysdef | grep bufpagesâ (and multiply by 4096 to approximate the current size of buffer cache) or use glanceâ s memory screen to see what size â BufCacheâ is.

Note: Although buffer cache is dynamic in size, decrease only occurs under memory pressure and then only decreases very slowly. So, the buffer cache often grows farily quickly to dbc_max_pct and only decreases (and slowly) when memory presssure is high.


R
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.
Xavier BLANC
Frequent Advisor

Re: how often the OS buffer cache is sync'd.

Ok thanks to all.

Thanks Duncan here is the start command is :
/usr/sbin/syncer && echo syncer started

From man syncer : "If seconds is not specified, the default interval is every 30 seconds."
Ok I'll give this to Progress Tech Support.


Victor and fred I'm interested in what you said :
I never really understand these parameter.
2 CPU 650 4Gb RAM
dbc_max_pct = 50 50 ...
dbc_min_pct = 5 5 ...

>What size buffer do you have?
If you mean db buffer ... note it is Progress DB : nearly 1Gb

>You could after change the way the JFS log works ...
How could I verify JFS is installed ( I don't think !)
here our basic filesys
/dev/vg01/data /Diap1/data vxfs rw,suid,nolargefiles,delaylog,datainlog 0 2

Best regards
Xavier
Victor BERRIDGE
Honored Contributor

Re: how often the OS buffer cache is sync'd.

Hi,
With 4 GB I put dbc_max_pct at 10% and 5% for min
If Im short of RAM I even put less (8%)
Since You are buffering with progress, the good solution would be to add the oprion I and Fred mentioned earlier but as Fred said micache option requires Online-JFS, do you have the product installed?

All the best
Victor
Fred Ruffet
Honored Contributor

Re: how often the OS buffer cache is sync'd.

IO cache is initially set up to dbc_min_pct% of your RAM (5% of 4GB). Then it grows slowly (regarding your usage) to a max of dbc_max_pct% of your RAM (50% of 4GB). With such a RAM, it would be safe to decrease min and max to something like 5 and 10 (personnaly, I would go further for a DB server. ie something like 2 and 5).

JFS is certainly installed. Online JFS is installed if "swlist -l bundle" gives a line like this :
B3929BA B.11.00 HP OnLineJFS (Advanced VxFS)

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Victor BERRIDGE
Honored Contributor

Re: how often the OS buffer cache is sync'd.

Thinking of it, how are you connected to your disks? are they mirrored or RAID5 arrays?

Because there is other parameters we could go through such as I/O timeouts and queue lenght and depth

All the best
Victor
Xavier BLANC
Frequent Advisor

Re: how often the OS buffer cache is sync'd.

Ok
I'm going to modify dbc_min_pct and max ( not today, this is prod environment).
And see what happen !

For JFS
swlist -l bundle|grep -i OnlineJFS produce nothing ( I've tried also with fileset ).
Can you tell me on what CD is the JFS, and if I go to JFS what I need to know. Should I backup and recreate my filesystem ( I currently use LVM ).

Disk config is Fiber channel bus -> DS2400 -> several 18Gb disk.
The db is on a Mirror-ux disk ( 1 - 1 ) .
No raid (hard)

As we have plenty disk I was wondering about stripping but I've no knowlegde on this. Do you think someone on this forum can guide me to do it in the future. Or does it require HP engineer !
I know quite well HPUX and understand HP LVM.

Thank again to all
Xavier







Fred Ruffet
Honored Contributor

Re: how often the OS buffer cache is sync'd.

OnlineJFS is not free. You will need to contact your resseller. OnlineJFS main goal is to provide Online resizing of FS (Do not need to unmount a FS to add space). Install needs a reboot.

If you have already set up mirroring and have space for it, I would tell you not to stripe.

You don't need someone to set up stripping. It is not harder than mirroring. There are just things you must do and some not. If you plan to do it, just ask advices here.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Victor BERRIDGE
Honored Contributor

Re: how often the OS buffer cache is sync'd.

Hi Xavier,
You will have to buy Online-JFS...

I do lvm striping over a HDS SAN (raid5...)
to get something like loadbalancing... (I know there is a software for that but its again a question of time ($$$)...

I believe you will gain in I/O bandwidth (I do see quite a difference...)by striping - and its not difficult...
create striped swap...
#/sbin/lvcreate -l 1016 -n lvol2 -i 4 -I 256 -r y -C n -s y -p w -d p s4vg01

Here is how to see queue depth and I/O timeout:
# pvdisplay /dev/dsk/c4t0d0
--- Physical volumes ---
PV Name /dev/dsk/c4t0d0
PV Name /dev/dsk/c8t0d0 Alternate Link
VG Name /dev/s4vg01
PV Status available
Allocatable yes
VGDA 2
Cur LV 8
PE Size (Mbytes) 4
Total PE 3472
Free PE 1045
Allocated PE 2427
Stale PE 0
IO Timeout (Seconds) 180
Autoswitch On

# scsictl -a /dev/rdsk/c4t0d0
immediate_report = 0; queue_depth = 8

All the best
Victor


Fred Ruffet
Honored Contributor

Re: how often the OS buffer cache is sync'd.

If you plan to stripe, create VGs where all LVs are stripped on the same number of disks (Like for Mirroring). If you don't, you could came to a situation with a LV that you cannot extend on a VG with plenty of space.

For your DB, Stripping may not be a good thing unless you have a SAN array with multiple paths to disks (Controlers, Fibers and LUN created to balance accesses). In other cases (classic SCSI internal drives or SCSI array), you may have better IOs with Mirror.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)