Operating System - HP-UX
1832872 Members
2520 Online
110048 Solutions
New Discussion

Why would I experience more Physical writes than Logical Writes?

 
SOLVED
Go to solution
Kevin Nikiforuk
Valued Contributor

Why would I experience more Physical writes than Logical Writes?

Hello,

I started anyalyzing a machine and noticed that there were more global disk physical writes than global disk logical writes.

The way I understand is that Disk logical writes shows the number of system calls that are to be directed to disk devices but may or may not be physically written to disk and may end up in other memory like the buffer cache.

So, should we always see more logical writes as this shows all logical (ie. buffer cache)writes requests + pysical writes request (ie hard drive)?

Thanks.
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: Why would I experience more Physical writes than Logical Writes?

Kevin,

I agree with your understanding. My production server shows about a 3 to 1 ratio of logical to physical. What is this server doing and how are you measuring this?


Pete

Pete
G. Vrijhoeven
Honored Contributor

Re: Why would I experience more Physical writes than Logical Writes?

Hi,

I agree. Can it be that you are using raw disks? Some oracle DBA's like that, sinse Oracle uses a SGA it is not nessesary to use buffercache.

How is you buffercache set up? (max_dbc_pct and min_dbc_pct kernel parameters.)

Do you have memory problems?


Gideon
A. Clay Stephenson
Acclaimed Contributor

Re: Why would I experience more Physical writes than Logical Writes?

This is quite possible especially if you are in a database or application environment utilizing raw I/O. You could also see this if you are using the OnlineJFS mount options convosync=direct,mincache=direct which also have the effect of bypassing the buffer cache.
If it ain't broke, I can fix that.
Kevin Nikiforuk
Valued Contributor

Re: Why would I experience more Physical writes than Logical Writes?

Yeah, there is a memory issue with this machine. Mem util is averaging 98%, the dbc min=5 max=50 (2GB memory). This is most likely the cause of the extreme numbers that we are seeing on the disk. (that will be changed)

It is a offsite machine that I don't have easy access to, so I am working off a SysInfo and exported history data from PerfView.

I don't know if those paramaters are set to direct but that sounds like a good reason as to why no logical requests would be made for those writes. I will have to check that out at a later date when I can get back on that machine.

Thanks!
Bill Hassell
Honored Contributor
Solution

Re: Why would I experience more Physical writes than Logical Writes?

With completely random writes, it is certainly possible to have very few logical writes. For normally-mounted filesystems, all normal writes go through the buffer cache but if nothing else is written anywhere close by, the write will be posted with no advantage in having been in the cache. Programs that perform explicit direct writes (sync, not async) will completely bypass the buffer cache which = 100% physical writes. You'll always see write cache rates lower than read cache rates.


Bill Hassell, sysadmin
Hein van den Heuvel
Honored Contributor

Re: Why would I experience more Physical writes than Logical Writes?


You gave no indication of you LVM setup.
You also gave no indication of the scale of your problem are we talking 1% more or 3x?

If you have large logical writes, but a small stripe chunk size then mutliple physical writes will be needed, one for each chunk touched. With small chunks even smallish logical writes can straddle two chunks causing two physical writes.

Finally, you might have more or less heavy file extent fragmentation. Important files that have grown a little bit at a time? intermingled?

hth,
Hein.

http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-88681/B2355-90681_top.html&con=/hpux/onlinedocs/B2355-90681/00/00/99-con.html&toc=/hpux/onlinedocs/B2355-90681/00/00/99-toc.html&searchterms=fragmentation|filesystem