ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » disc read/write for a message via MQ

Post new topic  Reply to topic Goto page 1, 2  Next
 disc read/write for a message via MQ « View previous topic :: View next topic » 
Author Message
eva555
PostPosted: Tue Nov 20, 2012 1:41 am    Post subject: disc read/write for a message via MQ Reply with quote

Novice

Joined: 10 Sep 2012
Posts: 15

I was recently asked on how many times a disc read/write operation occurs from an MQ message from the time an mqput and mqget occurs. I have never read anything on this before and wondering if it was a trick question. Would you pls let me know anything on this????
Back to top
View user's profile Send private message
exerk
PostPosted: Tue Nov 20, 2012 1:59 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

The answer may be none for a non-persistent message to at least twice for a persistent message. Who asked the question, and in what context?
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
eva555
PostPosted: Tue Nov 20, 2012 2:24 am    Post subject: Reply with quote

Novice

Joined: 10 Sep 2012
Posts: 15

It was an interview question you guys may not encourage interview questions in this forum but this is just out of curiousity.
I did reply that it would have to be twice but then he was not convinced
Back to top
View user's profile Send private message
exerk
PostPosted: Tue Nov 20, 2012 2:28 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Interviewers that ask 'trick' questions - bad practice on their part. That said, if you think through the logical sequence of events when a message of either persistence is put and got you'll have the answer.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
markt
PostPosted: Tue Nov 20, 2012 2:31 am    Post subject: Reply with quote

Knight

Joined: 14 May 2002
Posts: 504

The only correct answer is "it depends". Not just persistence, but size of messages, previous work, any concurrent work, other application accesses to the same queue, transactionality (and probably more considerations too) ...
Back to top
View user's profile Send private message
eva555
PostPosted: Tue Nov 20, 2012 2:52 am    Post subject: Reply with quote

Novice

Joined: 10 Sep 2012
Posts: 15

Does it mean that the parameter LogWriteIntegrity in qm.ini does not affect this ?
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Nov 20, 2012 5:51 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9399
Location: US: west coast, almost. Otherwise, enroute.

The correct answer is 0, 1 or more times - depending.

All messages are first put to a buffer in virtual storage. If the message is persistent, then it will be written to disk (log). So, one write to disk.

From time-to-time, and at qmgr shutdown, buffer management software will write messages from buffer to disk. So, at least one (more) write to disk.

If the consuming app is alive and well, it will consume the message from the buffer. In this case, for non-persistent message, there will be zero writes to disk.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
markt
PostPosted: Tue Nov 20, 2012 8:26 am    Post subject: Reply with quote

Knight

Joined: 14 May 2002
Posts: 504

Quote:
If the message is persistent, then it will be written to disk

Not necessarily. IT DEPENDS.
Back to top
View user's profile Send private message
exerk
PostPosted: Tue Nov 20, 2012 8:29 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

markt wrote:
Quote:
If the message is persistent, then it will be written to disk

Not necessarily. IT DEPENDS.

Would you care to expand on that please, because I understand the way WMQ works to be that persistent messages are committed to the logs (distributed platforms) before being made available to an application? In my book, that's one definite IO access.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Tue Nov 20, 2012 8:54 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

bruce2359 wrote:
If the consuming app is alive and well, it will consume the message from the buffer. In this case, for non-persistent message, there will be zero writes to disk.


How about log i/o for UOW logging if the get is done with syncpoint ?!?

@all
IMHO "It depends" is the very correct answer. You can even think of i/o that is done to the mqerror log files because of a channel start that is caused by a xmit-q triggered channel that is fired because a message is put or other strange stuff like update queue depth counter and so on. theres a lot of i/o, when a message is put or get. not just 1 to buffer and 1 to log....
_________________
Regards, Butcher
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Nov 20, 2012 9:02 am    Post subject: Re: disc read/write for a message via MQ Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9399
Location: US: west coast, almost. Otherwise, enroute.

eva555 wrote:
I was recently asked on how many times a disc read/write operation occurs from an MQ message from the time an mqput and mqget occurs. I have never read anything on this before and wondering if it was a trick question. Would you pls let me know anything on this????

It's definitely not a trick question. Your answer will demonstrate your understanding (or lack of understanding) of WMQ fundamentals. In this case, logging.

So, at mqput, a persistent message will be written to the log disk before being delivered to the queue. At mqget, the message will be written to the log disk before being delivered to the consuming program. In the gap between put and get, buffer management software may/will write the message to the queue on disk.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Nov 20, 2012 9:25 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9399
Location: US: west coast, almost. Otherwise, enroute.

Yes, It depends.

The interview question is somewhat open-ended. As such, it is a good question.

A good question solicits specifics as to how the product behaves, but also allows the interviewer to observe how the interviewee thinks through a problem.

My answer focused solely on the message, and omitted syncpoint information which is also written to the log.

Of course, we can get lost in the definition of an I/O, how many I/Os, etc..
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Tue Nov 20, 2012 10:30 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

An MQPUT with no syncpoint of a persistent message to a queue where there is an outstanding Get With Wait with no syncpoint will have the persistent message pass between apps with no writes to a log or queue file, if I recall correctly.

Whether its a good design to MQGET messages without syncpoint if they are important enough to be persistent is another question... (ah, no.)
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Nov 20, 2012 11:32 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

exerk wrote:
Interviewers that ask 'trick' questions.


I find that companies who allow interviewers to ask meaningless questions are companies I would not want to work for anyway.

Knowing the answer to this question does not help implement a system more efficiently, or in any way impact cost of transactions.

Back in the olden days when disk space and I/O bandwidth were constrained, such information may have helped implement a more efficient system. But with today's relatively unlimited I/O bandwidth and the cost-per-byte for DASD being very low, it's like asking you how much does your long distance cost you on your mobile plan. The answer is pointless since the wireless carriers throw long distance in for free.

http://en.wikipedia.org/wiki/John_Draper

Back in 1970, long distance cost US$3 per minute, it would be worthwhile knowing how many times an MQ message hit the disk.

Phreaking

As Colonel Jessup once said: "I'm a fair guy, but this Phreaking heat is making me crazy." "She outranks you Danny boy. "
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
exerk
PostPosted: Tue Nov 20, 2012 11:37 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

PeterPotkay wrote:
An MQPUT with no syncpoint of a persistent message to a queue where there is an outstanding Get With Wait with no syncpoint will have the persistent message pass between apps with no writes to a log or queue file, if I recall correctly.

Whether its a good design to MQGET messages without syncpoint if they are important enough to be persistent is another question... (ah, no.)

And there was me thinking that all persistent messages were logged, irrespective of a waiting getter, or syncpoint, or not, because it's not going to be persistent if the box dies. Every day still a school day...
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General Discussion » disc read/write for a message via MQ
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.