Sunday, June 26, 2011

WebSphere Message Queue Performance Quick Checklist

Notes: This checklist is to provide readers a quick and handy reference of factors influencing the performance of WebSphere Message Queue (WMQ), based on my previous works and other IBM published resources. It is not meant to be a detailed guidance or discussions of the performance tuning. However, it indeed provides the list of parameters that the reader can look into for investigating further any performance issues.


Hardware & software requirements Don’t forget to check these requirements that can be found at WMQ infocenter.
Separate log and data file systems Log I/O and queue manger can cause contention on disk usage. To avoid it, use separated and dedicated physical devices for log and queue data.
Data cache Specify file system cache to the queue data, while no cache to the queue log.
Storage type: SAN, NAS, solid state disk SAN/fiber channel has less I/O overhead than NAS/NFS. In addition, SAN disk has the writecache feature that can improve I/O performance.
Network connection speed and latency 10 Gigabit network adapter is better than 1 Gigabit for large volume of messages. Also the storage location must be close to the MQ server.
TCP connection Keep TCP connection alive.
Persistent and non-persistent Much high throughputs can be achieved with non-persistent messages.
Queue buffer The maximum values of DefaultQBufferSize and DefaultPQBufferSize are 100 MB per queue. Make sure that enough real memory is available, since each queue would have the real memory of the value defined with DefaultQBufferSize or DefaultPQBufferSize

To make the change of DefaultQBufferSize and DefaultPQBufferSize, the queue manager has to be stopped and re-started. In addition, in the case of DefaultQBufferSize , the queue must be deleted and re-created.
Parameters defined in queue manager log The log is only relevant to the persistent messages.

Circular logging has a better performance than leaner logging. However, the trade-off is that learner logging provides more robust data recovery capability.

The number of log files should be defined to have sufficient primary logs to hold the active log plus the new log files used until the next checkpoint. When secondary logs are needed, they will be instantly formatted which will cause the delay.

As long as there is enough disk space, use the maximum size of LogFilePages, which is 650535.

It is better to have a small number of larger log files. In general, 10-20 log files may be adequate.

In general, SingleWrite is a better choice in terms of performance than DoubleWrite or TripleWrite

For performance, specify the maximum value of LogBufferPages which is 4096. This will help writes of large amounts of log data and enable large messages to be written in a single log I/O.

The type of log and the size as well as the buffer of log file page must be determined and specified when creating a queue manager. However, the number of log files can be modified after the queue manager has been created. The queue manager must be restarted to take the change into effect.
Trusted channel Specify a value of MQIBindType=FASTPATH in the Channels stanza of the qm.ini.

As channels are WebSphere MQ product code and as such are stable, there should be no concerns to run channels as trusted applications.
Trusted listener In the same way that channels can be run as trusted applications a listener can also be run as a trusted application.

MQ_CONNECT_TYPE=FASTPATH must be set in the environment in which the queue manager is started in order to enable the trusted listener.
Channel attribute: SHARECNV Only for WMQ v. 7 or above. SHARECNV channel attribute of 0 specifies no sharing of conversations over a TCP/IP channel instance. However, by using dedicated TCP/IP channel will disable other features provided by WMQ v.7 such as heartbeating, read ahead, administrator stop-quiesce, and client asynchronous consume.
Number of concurrent applications When processing persistent messages, it is recommended to run many instances of the application concurrently in order to optimize the efficiency of the queue manager log. It is possible to have tens or hundreds of applications running concurrently without any detrimental impact on queue manager log performance. In this situation the overhead of a log write at commit time is shared amongst many applications.
MQ Cluster Design & setup your MQ cluster to increase the message processing capability. Information on MQ cluster is available easily. Monitoring the cluster performance (such as watching the queue depth of your cluster queues) is an importance step in performance testing. If the queue depth is high, of course you may add another cluster member into the existing cluster. However, another approach (not known to majority) is to add one or more cluster receiver channel(s) associated with the cluster queue(s).
Application processing and units of work From a performance point of view, it is important that all applications process persistent message within a unit of work (also referred to as syncpoint).

Sunday, June 19, 2011

Why Did A Chinese Family Leave Singapore?

Notes: (1) This week's blog is totally non-technical. I post it here just for sharing a life story and experience. It was written by my wife in 2003 (her English is much sharpened now) as an essay for English course, part of the nursing degree she pursued (she is now a RN working for VA).  (2) The story described what happened many years ago. Situation is definitely different now, especially China has ascended to world's second-largest economy. (3) If you find it is not to your interests, just don't read it further.

15 years ago, I didn’t know the real meaning of discrimination. Like all residents in Beijing, the capital of China, I enjoyed all the privileges as a Pekinese:  speaking standard Mandarin and having the highest quality of life in education, economy, culture, and politics in the whole country. Therefore, the Pekinese looked down on all the people who spoke Mandarin with local accents and regarded them as second-class citizens. Today, after having suffered from discrimination and prejudice in different societies of different countries, I believe that every immigrant has his or her own special feelings about racial and ethnic discrimination. My immigrant experience in Singapore tells me that any discrimination—positive or negative—is not fair, and an adverse prejudice or discrimination may underlie a favorable one for some people. 

In 1994, after my husband got his Ph D degree from EPFL in Switzerland, my whole family moved to Singapore. We were exhilarated and excited because we had left the life which made us feel discriminated against and isolated from Swiss culture, people, and society during six years in Switzerland. After all in Singapore we would live again in Chinese society where we could speak our own language and enjoy authentic Chinese dishes. Therefore we intended to settle down on this small beautiful and rich island.

This island country’s population is three million, which is made up of 76.4 % Chinese, 15.5 % Malaysian, and 8% Indian from India. Around 1994, this country became one of the world’s high-income countries. The Chinese there speak both English and Chinese. The government of this county is mainly authoritarian and predominantly Chinese. Therefore all the policies made by the government tend to favor to the Chinese.

Because we are Chinese, from very beginning we benefited from the policies in which racial and ethnic discrimination was obvious. First, for keeping Chinese in the dominant position of the society, the government allocated 76% immigrant quota to Chinese people. Second, the government set various financial aids to attract Chinese people who received Ph D degree from overseas.  The policies benefited the government indeed in the effect of one stone for two birds: on one hand this country got the highly educated individuals; on the other hand, the government extended the labor pool of qualified Chinese immigrants and kept other races out.

Under these circumstances, my husband easily got a job with a big company in Singapore before his thesis defense. Besides a quite good salary, the government offered him allowances, such as housing and medical. Within one year after we landed in Singapore, we got our immigrant status and purchased a reasonably priced house of our own in the housing market which is controlled by the government and available only for citizens and permanent residents.  All we got from the government were far more than we expected before we came into this country.

Our “achievements” were admired deeply by some of our friends who came from France, Australia, and Britain. Some of them had been working in Singapore or married a Singaporean girl more than eight years, but they were still waiting for their green card.     From the viewpoint of them, the government opened the arms to welcome us to this country. In contrast, they didn’t receive any allowances at all from the government; they even could not select a cheap apartment to live because foreigners had to live in the apartments assigned by the government. Thereupon, they felt their contributions to this country were totally ignored by the government.

In this country, the government fosters national pride by telling people the success and the achievements they have made.  At the same time, the government emphasizes that the Chinese people are the achievements’ makers. Therefore, the Singapore Chinese consider themselves the greatest people in the world, who have radically turned a poor region into a prosperous country within 30 years since the dependence from Malaysia.  Both the attitude of discriminatory government and the self-pride of common people promote a trend that Singaporean Chinese are superior over any other races. They think Malaysians are lazy and Indians are liars. They don’t allow any Chinese to be a maid because in Singapore a maid holds the lowest social prestige; if Chinese became maid, the Chinese’s superiority will be toppled.  Consequently, the maids come from only the Philippines and Indonesia. Among Chinese, Singaporean divide all Chinese in four categories: Singapore Chinese, Taiwan Chinese, Hong Kong Chinese, and Mainland Chinese. Although we have the same physical appearance as Singaporean Chinese, our accent---no matter if we speak Chinese or English—can tell us apart.  According to the economic prosperity, Singaporean Chinese are superior in every aspect to other Chinese, and Mainland Chinese is in the lowest position in all aspects due to the economic poverty of China.  In the mind of Singaporean Chinese, Mainland Chinese come to Singapore just for earning more money as well as for having more children (because of Chinese policy of one child for one couple). As a result, they show their superiority in front of the Mainland Chinese in every opportunity.

Once, my husband met an ordinary man on the street.  He asked my husband what kind of job he did. My husband told him he was an engineer. This man said to my husband, “ As an engineer here, your salary is higher than your president, DENG XIAOPENG.” (DENG XIAOPING was Chinese president at that time.) His attitude was telling us it was the Singaporean who gave us everything we needed.  We met very often the similar ridiculous people in Singapore.

Another time, my husband bought a Walkman from a small shop. After paying, he kept still and stared at the salesman for a while; then, this man asked, “What are you waiting for?”  My husband answered, “ I am waiting for ‘THANK YOU’ from your mouth.”  He replied my husband, “I have never said ‘THANK YOU’ to a China Man.” He meant how a giver could say “THANK YOU” to a recipient.

One day while I walked on a street with my son, who was three years old and born in Switzerland, one woman came to me and directly asked whether I came from mainland China. Then she said to me, “ You have only one child, right? He is very lucky to have the chance to come to Singapore, and you too. You can have more children here, not only one. Don’t you?”  I knew she hinted if we didn’t come to Singapore, my son had no food, no clothing, no good education, and so forth.  I had heard similar words from different mouths hundreds times. Finally I found the best way to answer such nonsense question: keeping silent.

Another painful experience happened to me in a taxi. When the driver knew I came from mainland of China, he began to speak down about Mainland Chinese. Automatically I defended, “Why do you speak down so much about Chinese while you use many things made in China, especially Chinese medical herbs?”  He yelled to me, “We Singaporeans throw a lot of our Singapore DOLLARS for your GRASS!”  Not only superior are Singapore Chinese over other people, but also more precious are Singapore DOLLARS than Chinese medical herbs.

Although we got the house and the permanent resident status easily, the feelings of disappointment and frustration were increasing as we lived there until we left this country with tremendous regret of coming to this country. We lived in Singapore just one year and a half. It seems to me like ten years and a nightmare. During the time, I said to my husband over and over again that the only thing could made me happy was to bring me to the airport with my entire luggage and leave this country for good.

We have left Singapore now for seven years and a half, but the painful experiences are still very fresh in my mind. Through my experiences, I hope everyone who don’t want be treated by discrimination shows his or her integrity against any discrimination, including any benefits and favors from discrimination. 

If some day I go back to Beijing, I will never treat those people who can’t speak standard Mandarin like inferior citizens because I know any discrimination is not fair.

Sunday, June 12, 2011

ESB Product Consideration: DataPower vs Message Broker

Back to a number of years ago, when IBM WebSphere DataPower just got into market, I was one of the technical resources involving initially in the DataPower service offering in IBM GTS (global technology services, not IBM software group). My early involvement in DataPower was based on the judgment and belief that it is a very powerful product, and would be loved by IT. I also mentioned to people many times that DataPower will eat the integration pie that primarily enjoyed by IBM WebSphere Message Broker.

However, the invasion of DataPower into the territory of Message Broker hasn’t been seen until recently. One of the reasons seems to me that the DataPower has been stamped as a hardware appliance.  Due to it, probably (dumb) people would think that it is something like F5 or load balancer. This is kind of misunderstanding that was really an insult to this great product (it may also be an IBM’s problem on how to brand it, I believe).

From my perspective, the greatness about DataPower (in addition to all IBM marketing materials about its capabilities) is the fast prototype & development and easy ongoing management. This is a very convincing argument when coming to the decision for company to make selection of products/tools for their IT needs (especially ESB & enterprise integration). In addition, it is pretty much no ambiguity that DataPower can deliver what it is supposed to do and what it can do without compromising expectations (such as performance).

On the other side, Message Broker is still strong with the enterprise integration such as SAP, Sieble & PeopleSoft (relying on adapters) and the support of data formats. But, there are many overlapped functionalities between DataPower and Message Broker. On top of that, DataPower can do a few things much better… Below is the comparison between DataPower and Message Broker.

Message Broker DataPower
  • Integrating and leveraging the WebSphere MQ messaging infrastructure.
  • Supports different protocols such as MQ, JMS, HTTP(S), Web Services, ftp, and convert one to the other.
  • Supports a wide range of data formats, including XML, binary (COBOL, C), positional/delimited, and industry formats (EDI, SWIFT), and convert one to the other.
  • Provides a number of capabilities to customize mediation, including C/C++, ESQL, Java, XSLT, and PHP.
  • WebSphere Adapters for enterprise applications (SAP, PeopleSoft and Siebel).
  • Offers z/OS clients platform-specific benefits (CICS, VSAM).
  • Similar to Message Broker, DataPower can do any-to-any transformation (in theory, Yes. But in practice, you may need to use WebSphere Transformation Extender (WTX)).
  • Supports almost every security protocols and different authentication/authorization schemas, such as Web Service security/policy, TLS/SSL, SAML, LDAP, RADIUS, etc.
  • Provides field level security: WS-security down to the individual operation, encrypt & sign individual fields, nonrepudiation.
  • Data validation, parsing and filtering, and meta data manipulation.
  • Transport level protocol conversions from any-to-any.

Tuesday, June 7, 2011

Service Oriented Architecture (SOA) - Thought #3

One important aspect of a successful SOA effort is to ensure that SOA is governed. The importance of SOA governance is not fully recognized very often until the issues/problems are surfaced. In brief, SOA governance is about people, processes and technology. 

People: SOA aligns the business and IT to work together more flexibly and adaptively. As a result, any SOA project will involve many different parts of an organization, from business domains to IT groups. The side effort of the involvement of this scale is the difficulties resulting in coordination and cooperation. To make SOA a success, organization structure must be shaped to be an enabler. Furthermore, roles and responsibilities must be clearly defined to reduce the risks associated with ambiguity of who is doing what.

Processes: There are two sides of a coin in terms of processes. On one side, a few major processes as an important part of SOA governance framework must be established. For example, SOA governance must have checkpoint process in place to guard SOA activities. On the other side, a set of processes will be followed when services are modeled, assembled, implemented, and deployed. These processes should be governed by governance processes. They are called governed processes.

Technology: Technology and tools can help making governance life easier. For example, registry can facilitate the discovering and publishing services. Repository can store many important metadata associated with services. In addition, tools can be very critical to the success of the implementation of SOA governance.