Skip to main content

Optimising C programs on z/OS V1R8

Now for a topic with a possible audience of zero (which is probably the number - besides spambots - who read this blog!).

Over the last few weeks I have been investigating the performance of our application on z/OS. The application is written in C and runs in batch and CICS. A customer reported that our latest version was not performing as well as the version they were currently running.

Testing showed there was a difference. The same tests did not show a difference on other platforms. z/OS has unique characteristics, not surprising given the hardware it runs on, and there are bound to be factors that affect performance that do not affect other platforms.

We build our application using unix system services and link the final modules into a Dataset (load library). What this means is that we can use standard unix shell utilities, make files and other tools just like on any other unix platform. This makes development much easier. The final link is the first time anything leaves the unix environment.

When investigating anything on z/OS the first place to go for information is the IBM Redbooks site. I found several books describing performance including one which used C to build several different types of applications.

The result of two weeks work was a final set of modules that performed about twenty percent faster and an increased understanding of how to set up the unix system to be able to compile and link using the maximum optimisation options. The final version I delivered did not use maximum optimisations as I had achieved the aim of improving performance to match or exceed that achieved with the old version. Using the greater optimisations increased build times and exceeded the temporary workspace settings. By the time I had solved the workspace problems I had run out of time to rebuild everything from scratch.

For those of you building C programs using Unix System Services the default workspace sizes (for SYSLMOD for example) can be adjusted using the environment variable _CC_WORK_SPACE. The default is (32000,(30,30))

For example
export _CC_WORK_SPACE="(32000,(90,90))"

Configuring z/OS is not for the faint of heart and IBM support helped me with some of the issues. The final one I managed to figure out for myself. I used to administer our z/OS systems when we were running P/390 and FLEXES systems and I wish I had been able to access IBM support then! Searching through IBM manuals for something as complex as OS/390 (or z/OS as it has become) was never easy!

Comments

Popular posts from this blog

The Extended Attributes Are Inconsistent in Windows 8

I have upgraded my laptop to Windows 8 and all was fine for about three hours and then I started to get an error when trying to run any application that required Administrator privileges. Half an hour of Googling led me to this blog post   Case of the broken uac prompt This problem was caused by downloading themes. The final theme I had decided on included a new sound theme. Clearly at least one of the sounds did not play (the one for the UAC prompt!). Changing the sound theme (right click on desktop, choose "personalisation") to Windows Default sorted out the problem. Doing a clean install would also have fixed it but that would have been a drastic solution and as soon as I installed a new theme it may have happened again.

Beware vnc and upnp

My new linux box got hacked yesterday. I was careless. My ADSL router has upnp support and it is turned on by default. I enabled "Remote Desktop" in Linux - which is a version of vnc - and decided not to set a password as it would not be accessible from outside the local network. That was my first mistake. Last night I noticed a second connection to the linux box. Someone was using the browser and had connected to Western Union and was trying to install the flash plugin. They had not got very far as Fedora 14 does not install Flash on a 64bit system as it is still in beta so the install is not straightforward. I was able to disconnect this errant person before they got any further and I then disconnected the ADSL line from the modem to prevent another attempt and proceeded to diagnose what had happened. I checked the preferences for VNC and noticed the automatically configure the network check box had been selected and that it was reporting an external address could be ...

Which tablet?

I have been playing with a SmartQ V7 for the last month. As a toy to learn about Android and to get an idea about what I want in a tablet (or slate as they used to be known) it has been a useful tool. The first thing I have learnt is that a 5 to 7 inch screen is too small to read books comfortably unless care is taken to make the fonts look crisp. I tried out the eReader at Borders (a Kobo 6 inch device) and the books looked good. The letters and words were easy to read. However if you put a PDF document on the same device the experience is not as good unless the same specially optimised fonts are used. When you go to colour graphics such as for comics then the screen resolution becomes more inportant. The iPad with its larger screen and decent resolution will be a good choice for this sort of usage. It will still read books and it may not be as comfortable as an eInk screen and its battery life will be less - some eInk based readers can go weeks between charges - however the iPad stil...