Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Still running out of memory #44

Open
calebbraun opened this issue Jan 4, 2018 · 8 comments
Open

Still running out of memory #44

calebbraun opened this issue Jan 4, 2018 · 8 comments
Assignees

Comments

@calebbraun
Copy link
Contributor

Running the query "GHG by subsector" once again gave me the error:
[XPTY0004] RunMIQuery:runMIQuery(element(), xs:string, empty-sequence()): GC overhead limit exceeded.

I was able to run it by upping the memory limit from 4 to 8 GB, but why does one query use so much memory anyway? The entire DB I'm querying is only 1.45 GB to start with.

@pralitp
Copy link
Contributor

pralitp commented Jan 4, 2018

@xavier-gutierrez also noticed queries were using all of the cores on the machine just to process a single query. Even after the Model Interface logging indicates that the query is "finished" processing.

My current thinking is something has changed in BaseX since we upgraded versions with regards to how it serializes the output generated from the Model Interface which causes it to use a lot of memory and CPU. I'll dig into this a bit and see if we can't do better.

@pralitp pralitp self-assigned this Jan 4, 2018
@russellhz
Copy link
Collaborator

any update on this?

@d3y419 and I have a project using iamrpt that relies on lots of GHG emissions queries and we ran into the same problem

@rplzzz
Copy link
Contributor

rplzzz commented Feb 15, 2018

Is this really an rgcam problem? It seems like the issue is in the Model Interface. Or is the idea here that there is something about the way that rgcam is running the Model Interface that is causing this problem?

@calebbraun
Copy link
Contributor Author

I thought the issue was with rgcam because running the same query on the same database through Model Interface directly goes quickly and doesn't show large memory use.

@rplzzz
Copy link
Contributor

rplzzz commented Feb 15, 2018

Interesting. What is the command that you use to run the query through the Model Interface directly?

@calebbraun
Copy link
Contributor Author

I ran it through the GUI using a batch query file.

@pralitp
Copy link
Contributor

pralitp commented Feb 15, 2018

Sorry I haven't filled in any details about this issue yet. Well, it is sort of an rgcam issue. It appears the explosion in memory usage occurs when serializing results to get passed to rgcam.

This process is part Model Interface and part BaseX (When running batch queries in just the Model interface it is all Model Interface thus we do not see this issue) where the model interface must generate output in one of the BaseX structure they support for serializing and from there it will handle converting to CSV (or potentially other formats).

I tried switching to another BaseX structure which seem like it should do better with memory -- didn't help. I tried digging into he BaseX source code to see what I could get away with in terms of avoiding copying memory in the data structure I pass for serialization (a sort of copy on access scheme) -- didn't help.

And there is where I left it as I didn't (still don't?) have time to dig into it any further.

@russellhz
Copy link
Collaborator

Can the memory limit be increased again? A client needs to be able to run GHG queries from iamrpt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants