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
GC overhead limit exceeded #351
Comments
Yeah, that's going to be tough. enwiki will probably be even worse. A few questions:
I'm just trying to get a sense of your machine's performance profile. In terms of pointers, using this for reference: http://xowa.org/home/wiki/Dev/Command-line/Dumps
Each of the following will reduce memory load, but also slow things down
|
I have an i7-4790k 4Gh with 32GB memory
the last 7 were built with html so that I could download the imagery What I noticed with all (of the last 7) builds was that the rate started low with an outrageous ETA (usually measured in days), the rate would then pickup with the ETA down to a small number of hours. The rate would reach a peak and then slowly decline with the ETA slowly getting longer again for dewiki I am using
for enwiki I am using
As of right now the stats on the build for enwiki are
I am hoping this will improve (or at least finish) |
As of now (roughly 24 hours later) the stats for the enwiki html build are
As you can see, the rate is slowing I suspect if I were to start at, say 1,000,000 I would get the behaviour I mentioned above (starts slow, speeds up, then slows and slows) |
I have stopped my enwiki build and instead started a netbeans profiling session on the dewiki html build (because its smaller than enwiki) As it is running now there are two object classes that just seem to increase in number (whereas there are many that are transient) It looks like the json parsed results are not being discarded? (if they should) |
I cant quite put my finger on it, but... The mru cache seems to be doing what it is supposed to; however I think other entities (unknown) are maintaining a reference, so they are not garbage collected This is my hypothesis (at the moment) |
Yeah, these memory leaks are a pain to track down. Am starting a dewiki build on my side and will try to troubleshoot from there. Also, just as comparison, I built simplewiki and it comes in at 35 min. |
Have just tried to rebuild dewiki html (again) and its failed with this error message I cannot run the xowa version built by xowa_get_and_make.sh - it produces a lot of errors (which I believe is due to synchronisation issues) I am at a loss |
Sorry for all the trouble. I started a dewiki run last night, and hit the same error. After analyzing the memory dump, I think I found the cause of the memory leak. I made the commit above, and am running another dewiki run tonight. Hopefully it works (it usually completes in less than 8 hours)
Sorry, wasn't expecting that. Can you post the err.txt for that run? (or wherever you see a lot of errors). I'm running with the latest codebase here (which should be the same as the xowa_get_and_make.sh) and so far there haven't been issues. Also, for what it's worth, I think I'm done with #320. Last night's and tonight's run was done with the non-hzip mode:
Finally, just as a point of reference, I run the builds with this command:
The Anyway, hope this helps. |
This is the log from the straight xowa run I think this is related to the synchronisation issues I have mentioned |
I have just started a build with the source changes On some of my memory analysis, I think that the image info is held in memory. So as the total number of images grow this will need more and more memory - or have I misunderstood |
Which version of Wikidata / Dewiki are you building? I'm building 2019-01 (I haven't tried to download 2019-02 yet) Incidentally, mine finished this morning:
My errors were much fewer, though I am getting some of the errors you reported earlier (namely the counts don't match)
Yeah, that's my way of forcing the JVM to crash if it reaches a certain size. If I remember correctly, it will continue to grow and start paging to disk.
Yeah, let me update the docs for that. It generates full-text search indexes. See http://xowa.org/home/wiki/App/Full-text_search
Yeah, I noticed it was 1 GB in my dump. I think this is a static size (won't grow), but is just huge b/c it's loading the entire commons image table in to memory. I'll look at it more over the next few days. Hope your run completes! |
When I run java on my machine with no memory switches it seems to act as though its -Xmx8000m Sorry if this sounds like an interrogation |
Success!
|
Sorry, for late reply, but been traveling
Nah, this was a mistake on my side. I forgot the default was 8GB default. I thought it was infinite. I always run the builds with the command-line above (for at least the past 5 or more years)
Nothing else set.
I have a weird hybrid setup.
Ultimately, I want to unify on a pure Java / Linux setup, but for the time being, I still have a heavy dependency in the C# / Windows world. From an XOWA perspective though, I've made sure that users can use whatever OS they want (Windows, Linux, Mac OS X). The same also goes for devs.
No worries!
Cool! Your err.txt is much smaller too, and in line with my own.
Yeah, I would think that's machine related? I also have a SSD (though it's a few years old). My hardware specs are on http://xowa.org/home/wiki/Dev/Command-line/Dumps#Hardware and I haven't upgraded it in the last two years (aside from memory - which isn't a factor here b/c of the 16 GB limit) |
Another thing, what is actually taking up all the space? |
Looking at session.txt from 20190205_225543.050.zip
the page |
Image links is pretty big. It's about 1 GB in my memory dump. Unfortunately, it needs to be loaded all in memory.
XOWA writes a lot of data to sqlite dbs, but it also caches a lot in RAM. From my memory, the worst offenders are (fuzzy numbers based on enwiki):
This means that a baseline, the XOWA enwiki build needs 7 to 8 GB. While building, it can reach up to 15 GB due to various caching XOWA does
All these caches get cleaned up every time Finally, I think the real offender in usage is Java GC. When profiling the app through VisualVM, I've regularly seen it drift upwards to 15 GB, and then tick back down to 8 GB. This "drifting to 15 GB and reset to 8 GB" occurs over a 30 or 40 second period which is easily the time it takes for XOWA to process 300 or so articles Anyway, hope this helps |
Oops. I was logging page title instead of page url. The page does exist here: https://de.wikipedia.org/wiki/Wikipedia:Frankfurter_Buchmesse_2017/Frankophone_Autoren/1984 I made a commit above to fix it. Thanks for the report! |
Marking this issue closed. Let me know if I missed anything. Thanks! |
I am trying to build dewiki html pages and around 380,000 pages with 2,286,446 to go I start getting the above error.
According to Oracle, this means it is spending an inordinate amount of time in the garbage collector.
Indicating (at least to me) that 'stuff' is not being released
Tracking this down is going to be a right pain
Attached are the err.txt and session.txt
20190201_064759.201.zip
Now I am going to build enwiki html to see how far I get
The text was updated successfully, but these errors were encountered: