From: "Austen Ito" <austen....@gmail.com>
Date: Mon, 27 Aug 2007 13:24:51 -1000
Local: Mon, Aug 27 2007 7:24 pm
Subject: Re: [hackystat-dev] Re: Migrating 2+ years of version 7 data takes an hour and counting...
Hi Philip,
I found a huge error on my part. Read below for more details... > [1] The entire contents of each data file must be read into memory at once (due to the call to unmarshall(); This turned out to not be a problem at all. I commented out the > When you now uncomment the SensorShell lines, the out of memory While I was looking at the code I found a _huge_ mistake on my part. > problem starts up again. What this means is that you've now isolated > the problem as being Issue [2]. I was loading sensor shell with a new key-val map after each attribute in an XML entry was parsed. This caused the original OOM exception that would occur before I invoked send(). I can now invoke the sensor, without increasing the JVM heap size, to read through large data files. The problems that still exist are: [1] Figuring out a good estimate of when to clear the sensorshell [2] Finding the reason why an OOM exception still occurs when sending Due to my error, I think that you are right that SensorShell is Thanks Philip. austen On 8/26/07, Philip Johnson <john...@hawaii.edu> wrote: > Hi Austen, > Thanks for the prompt response. I took a look at the code and here's > First, the issue can be localized to the structure of a very small > for (File sensorDataFile : directory) { > Unmarshaller unmarshaller = context.createUnmarshaller(); > The problem is out of memory errors. There are three basic scaling > [1] The entire contents of each data file must be read into memory at > Problem [3] is trivial to fix (and I suggested it in my last email), > for (File sensorDataFile : directory) { > Unmarshaller unmarshaller = context.createUnmarshaller(); > This doesn't solve the situation in which a single data file is very > To solve this, you have to address either or both of issues [1] or > for (File sensorDataFile : directory) { > Unmarshaller unmarshaller = context.createUnmarshaller(); > What this will tell you is whether reading the entire data file into > If the system blows up with the sensorshell code commented out, then > a. Buy more RAM for your machine (or move to a machine with more RAM > b. Replace the use of JAXB with a custom written SAX event-driven > for (File sensorDataFile : directory) { > where 'handler' is a callback to a method that will process a single > massageEntry(entry); > The good news with SAX is that the contents of the entire XML file is > The final issue, [2] potentially still remains. > Let's say that you discover that if you comment out the sensorshell > When you now uncomment the SensorShell lines, the out of memory > I can think of two reasons for this: > a. The SensorShell is implemented correctly, but given the available > b. The SensorShell is implemented incorrectly, such that no matter > All right, I hope that gives you some additional ideas to play with. > Cheers, You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||