1833875 Members
1848 Online
110063 Solutions
New Discussion

Re: MWC Questions.

 
SOLVED
Go to solution
brian_31
Super Advisor

MWC Questions.

Hi Team:

I have two questions in Mirror write Cache and Mirror Consistency.

1. What are they and why we should have them
off.(Advantages and disadvantages)
2. Are they on by default? If so how to turn them off.

The environment is N-Class with MirrorDisk/UX.

Brian.
9 REPLIES 9
Geoff Wild
Honored Contributor

Re: MWC Questions.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1eb14e49c5cdd5118ff40090279cd0f9,00.html


Looks like your question from a long time ago?



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.
Uday_S_Ankolekar
Honored Contributor

Re: MWC Questions.

If you turn off MWC that will give you better LVM performance if there are lots of writes being done.
and recovery will quciker in the event of crash if you put MWC on.

It's kind of trade between performance and recovery process.

-USA..
Good Luck..
Pete Randall
Outstanding Contributor

Re: MWC Questions.

Brian,

I'll quote from me course notes:

"Tracking of pending I/O is done in a cache called Mirrored Write Cache. The MWC holds the status of write I/Os to relatively large areas of a logical volume called Logical Track Groups. When a write I/O is scheduled it is resolved onto the LTG it affects. This entry in the cache is marked dirty. The I/O is scheduled, and when it completes the I/O is marked clean.

When a write I/O is made the LVM driver looks in the MWC. If an I/O to this LTG is already in progress, then the new I/O is scheduled. The MWC already shows dirty for this LTG. If there is not an entry in the MWC for this LTG then we need to mark it dirty and schedule a 'high priority' write of the MWC to the disk, where it becomes a Mirror Consistency Record (MCCR). Once this is done the temporary blocked write I/O can be scheduled."

The idea behind the default "on" settings for both is to allow for fast recovery on a system crash at the expense of additional runtime on writes. You can turn MWC off to eliminate the overhead but recovery from a crash will be slow. You can also turn both off but then the application will have to ensure it's own recovery.

Hope this helps,


Pete


Pete
Pete Randall
Outstanding Contributor

Re: MWC Questions.

Or "my course notes" - whatever!

;^)

Pete
Helen French
Honored Contributor

Re: MWC Questions.

1) These are two methods or options that can be used in a mirrored logical volume. If Mirror write cache (MWC) is ON, it will provide fast resynchronization of data during a mirror failure. This will keep track of each write() functions to the disk in a periodic manner and thus will affect your online performance (especially during large I/O transactions). It's your optiona and decision to turn it OFF or ON. You can turn OFF or ON both or one at a time. It depend on how fast you want data recovery, how fast you want your I/O requests to be performed and how much big application transaction (database) is required.

2) They both are ON default. You can see it from lvdisplay command. Check for "Consistency recovery" part. To change it use lvchange command:

# man lvchange
Life is a promise, fulfill it!
brian_31
Super Advisor

Re: MWC Questions.

Team:

Thanks for the answers. So if I have dumps configured to the same place as primary
swap AND I have primary swap mirrored then what would be the situation?

Thanks

Brian.
James R. Ferguson
Acclaimed Contributor

Re: MWC Questions.

Hi Brian:

Technical Knowledge Base document #KBAN00000180 offers some good insights into performance, the mirror write cache and mirror consistency.

Regards!

...JRF...
Helen French
Honored Contributor

Re: MWC Questions.

For the last question:

The recommended policy in that situation is to set both options to OFF or disabled. When the primary swap and dump are on the same area, you need to make sure that both MWC and MC are OFF at boot time to avoid loss of your dump!
Life is a promise, fulfill it!
Giri Sekar.
Trusted Contributor
Solution

Re: MWC Questions.

if you have dumps configured to the same place as primary swap AND you have primary swap mirrored (IMHO you should), then you want to
disable MWC and MCR for your primary swap space. When your system takes a dump, LVM is not active and doadump (the dump routine) is given pointers to where to copy the dump to. Upon reboot, MCR will tell LVM to recover your
primary swap LV. Now, what would win? the dump or what used to be swap? Probably the old swap stuff. dump is gone. Turn off MCR. Better yet, make dump a separate LV.

Hope this helps.

Giri Sekar.
"USL" Unix as Second Language