A while ago, I was on contract for my now current employer. They wanted me to port all the functionality of their application from OpenVMS on Alpha to OpenVMS on IA64. As part of the port, we had to switch from Advanced Server (Pathworks) to Samba on IA64.
I set up the Samba shares for them and ensured it worked in testing, but by the time my contract ended, the switch still hadn't been made, and was not made until about 4 months later.
Now I find myself looking at a machine that's completely CPU bound dealing with Samba polls from the Windows Server world out there.
Looking at the scripts that run in Windows land, we find that the majority of them are something like:
if exist \\sambaserver\somedir\*.txt copy \\sambaserver\somedir\*.txt c:/somewhere/
Now, let's think about what this does. The script asks the Samba server to connect to a share point and determine if a file is present, and copy it locally if so. Simple, right? But what's happening on the (OpenVMS based) Samba server?
Well, Samba connections are created in response to the client opening a port (139 or 445). That is, there is no persistant server like Advanced Server. Each time you connect to a Samba share, OpenVMS created a new process. Now, Samba is tries to be smart, and assumes that the connection will be around for a while. So it goes and reads INDEXF.SYS for the directory you connected to so as to cache file information such as the create date and size of the file (which Windows expects each time you do a directory lookup). Unfortunately, the way the script is connecting, if there are no files to process (or even if there are) this action is a complete waste of CPU time and I/O as the share is disconnected at the end of the script.
The appropriate way to do this is to connect the server/directory combination as a network drive and then refer to the local drive letter in the script. Assuming the server/directory is mapped to drive N:, the script then becomes:
if exist n:/*.txt copy n:/*.txt c:/somewhere/
By asking the Windows admins to change to this method, I've gone from a machine that was peaking at 100% CPU to one that's now peaking at 50% CPU. A good win for just "doing it right".
[21-Jan-2010]
Not the Sydney Morning Herald:
Do we really need the Java, Apache, and PHP on our production machines to manage them? What are your views of Systems Management Homepage, a tool that is the "single system management solution for managing OpenVMS"? (104 words)
[14-Jan-2010]
Single member shadow sets:
I wholeheartedly support Bob Gezelter's proposal that HP change the licensing terms for Host Based Volume Shadowing to allow no-cost single member shadow sets. (176 words)
[08-Jan-2010]
How much faster is FAST I/O?:
Quite some time ago, I was asked how much better FAST I/O is than say, accessing the data via reading... (281 words)
[06-Jan-2010]
Race condition in SYSTARTUP_VMS.COM:
How to avoid temporary file name collisions, and how not to use sysman input files. (341 words)
[23-Dec-2009]
The C Programming Language Section 4.10 Recursion:
An extremely funny parody of part of The C Programming Language book, with a special guest author H.P. Lovecraft. (1720 words)
[18-Dec-2009]
The known universe:
This video gives a view of the universe with all depicted objects accurate to currently measured scientific data. Rather amazing. Via Jason Kottke. (53 words)
[15-Dec-2009]
Queue management weirdness:
This is weird. I was trying to come up with a way to let specific users use SMTP to send email off a box, and I thought "ah, there's a generic queue, and an execution queue. I can just modify the protection of the execution queue, and add an ACL for the users I want to allow email access." (302 words)
[11-Dec-2009]
CMS API documentation:
The documentation for the CMS API is in drastic need of a review. And have I found a significant memory overrun in the API? You bet I have. (429 words)
[09-Dec-2009]
Permanent position:
I'm very happy to announce that I've accepted a permanent position at a company that I've done contracting for in the past. There is a lot of work to do here in the development tool space. Additionally, I believe the performance of the application could significantly benefit from an analysis of the underlying RMS files. Now I'll have time to do that (when I not doing other systems admin-y things). (70 words)