Job process dies at around 1GB RAM usage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ian_bennett
Participant
Posts: 15
Joined: Sun Sep 01, 2002 6:56 pm
Location: Australia
Contact:

Job process dies at around 1GB RAM usage

Post by ian_bennett »

When the job process hit around the 1GB of RAM mark it soon aborts - no error message given.

This is occuring when using the XML reader to parse large files and we have noticed it with a few jobs.

Anyone else experienced this behaviour?
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

Yep, the XML reader is a dog. It tries to read the entire XML file as a single document in one very big text field. Very large XML files cannot be handled by the XML input stage as they run out of memory. You are better off processing it via a sequential file stage and parsing it in a transformer. You will find it wont hit a memory limit and it will run at least 100 times faster. BASIC routines can help you handle tags, stage variables can handle complex transactions by saving values between rows and building up a flat record from an XML structure.

Spent a few days doing this for some 8G plus XML files and it was worth the effort.

DataStage TX is better at XML processing then DataStage Server or Enterprise.
aartlett
Charter Member
Charter Member
Posts: 152
Joined: Fri Apr 23, 2004 6:44 pm
Location: Australia

Post by aartlett »

I would have to agree about the XML reader in DS Server. Haven't trird TX.

When I last had to play with XML files, especially when I had to extract multiple files (record types) out of theone XML file we generated it externally using a script and I think it was the SAXXON XSLT. This was a Java system so we took a hit because it was Java. We tried the C++ version but the sysadmins where I was were very draconian and would allow an upgrade to some libraries, I could easily get around thos eproblems in the Java version. :)

I've had to support XML that is sequential files and transform processed. It is very quick but a bugger to handle changes (I think it is yours I'm supporting Vince).

I hold to the maxims: Data Stage is not ETL, PX is not Data Stage. Use the best tool for the job. I get in a bit of trouble sometimes, but generally I get the support for this.
Andrew

Think outside the Datastage you work in.

There is no True Way, but there are true ways.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

That's the drawback, sequential file processing is fast but it can be hard to support, especially if you need to change or add XML elements.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

So how do people feel about large repeating XML files? Seems to me a misuse of the format. An XML file with one million repeating records also holds one million duplicate definitions of those records which take up as much if not more space then the data itself. Is this incorrect use of XML? Should the data source be producing these volumes in a delimited of complex flat file format? XML seems ideal for small complex real time transactions but a big pain for large batch processing.

I know at the project Andrew and I worked on they probably would have saved a lot more time and money rewriting the code that produced the XML to produce delimited files, saved a heap of disk space, built all the jobs in a fraction of the time and saved a heap of money.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If there is a choice in the matter, then I whole-heartedly agree with you Vince. :wink:

However, in my recent introduction to the Wonderful World of XML there was no choice given - feeds in and out to business partners like Yahoo and other search engines, build this huge zillion row XML file, read this huge zillion row XML file. Yark.

Starting to do smaller 'payloads' of XML for RTI/SOA jobs as well, but right now we've been having fun dealing with something that would have worked more better as a flat file IMHO, but since XML is The Way Things Should Be Done nowadays... :roll:
-craig

"You can never have too many knives" -- Logan Nine Fingers
aartlett
Charter Member
Charter Member
Posts: 152
Joined: Fri Apr 23, 2004 6:44 pm
Location: Australia

Post by aartlett »

One of the problems with the XML we are getting, and anyone who has processed weblog data will know, is the amount of redundant and non-required information. We are trying to get the source system to provide us with the data in a simple flat file.

One problem we had was that the originating source changed the tag for email links. They neglected to pass this down the line, who needed to know anyway :) and we stopped getting the data we needed. If they had provided flat files, a change to their xml wouldn't have effected us and all would be happy and I wouldn't be trying to modify Vince's code :).

One advantage of XML is that if the file format changes (new fields are added) the XSLT will ignore them as they haven't been asked to be extracted. This is what happened at my last gig. The source changed the feed and we had zero impact until we decided we wanted to use the fields
Andrew

Think outside the Datastage you work in.

There is no True Way, but there are true ways.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

The standard web log reader rocks, you could churn through a big web log in no time with all the handy routines that come with the web log import such as URL parsers. It's when you need non-standard browse and click event event information from your web site that you get into trouble.
Post Reply