Closed Bug 404842 Opened 18 years ago Closed 18 years ago

increase throughput of socorro processor

Categories

(mozilla.org Graveyard :: Server Operations, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: ted, Assigned: aravind)

Details

From anecdotal evidence, the processor seems to be running behind the influx of crash reports from our beta release. I'm sure we can improve this, by running more processor scripts, or adding more hardware, or something. We should also take this opportunity to do some ad-hoc benchmarking so we can avoid getting completely swamped when we get to the final release. sayrer: can Aravind just run multiple copies of the processor script to increase throughput? I forget how exactly it works.
sayrer's still on vacation, but I think I can answer this one: you can definitely run multiple copies of the processor at once... you'll need to keep an eye on them, because the processor may be I/O bound, not CPU-bound. Yes, it would be very good to get numbers right now on how many reports we can handle per-hour from the log files.
I started another python processor process. Lets see if that helps with the processing times. in the config file backgroundTaskCount = 2 Does that mean I should see two stackwalk processes per processor? I only see one so, I am not sure if I should be changing that somewhere else.
Assignee: server-ops → aravind
I think that is an obsolete setting that does nothing.
I am currently running 4 processors and they seem to be chugging away at the crash dumps. It would be nice if the processor code could spawn more than one processor in parallel as necessary upto some preset limit. Its easier to have to the processor code handle this stuff than spawn multiple processes in the shell and have them step on each others toes. Also I have had long standing requests to trim the logging output. That would really help debugging and keeping the log files manageable. We still have about 8700 dumps to process. Its going down at the (net) rate of about 3 every 10s or so.
At this point we are still pretty backed up and the situation doesn't seem to be improving. Here are a few observations. We are running the processors on a 4 CPU box with plenty of RAM. I currently have 4 processors running. The processor seems to be CPU bound (and not I/O bound). I hardly see any I/O wait in top. I have tried starting a few more processors but that only slows the whole thing down. This makes sense for a CPU bound situation. So, we either go back and figure out why it takes us this much of CPU time to process the dumps, or if there is not much more we can squeeze out of the code, then we should probably add more boxes into the mix. Adding Justin to this bug, so he can start planning to get more hardware.
CCing mento, I always thought the processor was I/O bound since it has to read in all those symbol files. Not sure why it'd actually be CPU bound.
If it really is CPU-bound we can probably profile it to find cheap improvements...
The map insertions are the large CPU expense in the processor. This can be addressed by having a cache that stores built-up maps for commonly-used symbol files, so that they don't need to be built anew for each dump. It can also be solved by writing the built-up maps to disk and using that in the processor (essentially, a binary symbol file representation in roughly the format of the maps used by the processor.) Mark
Hey guys, do you have any timelines on when we might be ready to try out this new processor?
Aravind: I'm working on an implementation, I don't have a clear timeframe yet. I'm also waiting on feedback from Mark to ensure he'll take this patch.
Please re-open this bug when the new code is ready.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → INCOMPLETE
Ok, my code still hasn't landed upstream, but I zipped up a source tree that you can use for testing: http://people.mozilla.com/~tmielczarek/breakpad-module-cache-src.tar.bz2 I have it setup with a hardcoded path that you can set in one of the source files so that we don't have to change any socorro processor configuration. When you unpack that tarball, edit google-breakpad/src/processor/minidump_stackwalk.cc. In the main() function, you'll see a comment that says //XXX: SET THIS APPROPRIATELY, edit the path underneath that to a path that exists and is writeable (the code should probably check this, but I don't think it does), then configure && make as usual. The caching code will write out a cache file for each symbol file loaded. The upshot of this is that the first access of a symbol file will be a bit slower, but each following access to that file should be faster. I don't have any hard data on this, so hopefully we can spin this up on staging and run it with some representative crash reports and the production symbols. Let me know if you have any questions.
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
sweet! Is this ready to push to staging?
It has unit tests for correctness (round trip of the serialization) and it passes them, and I've tested it with a small set of symbols and it produces correct output, but as I said, I haven't used it rigorously. Sorry, this has been rotting in my tree waiting for review, but we might as well put it on staging and put it through its paces.
Pushed the code to staging. Let me know when/how you want to test this.
I have been running this code, and so far over about 120 crash dumps, it is faster (by about 6 minutes). I noticed that the symbol_cache_path directory is upto 1 GB right now. What does this contain? How is this different from reading stuff off the real symbol tables? Are there any limits on the size of this directory. How does this work when I have multiple processors running simultaneously? Can you make this a setting in the python config file instead of having to change the source code?
(In reply to comment #17) > I have been running this code, and so far over about 120 crash dumps, it is > faster (by about 6 minutes). > > I noticed that the symbol_cache_path directory is upto 1 GB right now. > > What does this contain? > > How is this different from reading stuff off the real symbol tables? It's just a dump of the binary representation that the processor uses in memory for the symbols. Glad to hear it's that much faster! Essentially we save all the time parsing and building the in-memory representation. > > Are there any limits on the size of this directory. The processor code doesn't check anything related to this, it just writes out cached files for anything that's not already cached. The flip side of this is that you can delete entries any time you like, and they'll just be recreated if they're needed. We'll obviously need to keep this at a reasonable size for production use. Maybe you could just use find(1) to find files accessed more than 24 hours ago, and remove them? Given our volume of crash reports, any symbol file that's actively being used will be accessed multiple times per day, and worst case they'll just get rewritten if they're needed. > How does this work when I have multiple processors running simultaneously? That's a good question, and the code might need some locking to handle that properly. It should only have to lock when it's writing the cache file, after that concurrent read access shouldn't be a problem. I'll take a look at this when I get a chance. > Can you make this a setting in the python config file instead of having to > change the source code? Yeah, the code actually has a command line argument to set the path, we can easily hook that up in the Python code. In the interest of testing, it was just easier to hardcode it for the time being. morgamic: can you look into adding this? I added a |-c cache_dir| parameter to minidump_stackwalk to specify this dir.
Yeah, shouldn't be a problem to add it to the .ini's. I'll add it today.
Please re-open (or open a new one), when you think this code is ready for prod.
Status: REOPENED → RESOLVED
Closed: 18 years ago → 18 years ago
Resolution: --- → INCOMPLETE
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.