Hi Jeffrey,

I have a multithreaded application with several NSOperationQueues and it appears as if under heavy load conditions I'm overwhelming the garbage collector so-to-speak.

From what you describe, it looks like your analysis is spot on.

I essentially have three queues which can be processing different types of operations simultaneously.

- If I load up *one* queue with a bunch of operations and let it run, I find that memory is clean up very nicely. After each operation finishes it gets cleaned up by the collector appropriately.

- If I load up all three queues simultaneously (a not uncommon user scenario for this application), then I find that rarely do any of the operations get cleaned up. Things generally start out alright, but then get jugged up and very quickly the application can run out of memory.

You essentially have to throttle the mutator(s) so they don't outrun the collector. The collector has a tough time keeping up with one full-throttle mutator, three (assuming you've got a thread servicing each queue) is fairly hopeless. Another option *may* be to recode your app to produce significantly less garbage for the collector to clean up.

The GC release notes suggest that it's possible to "outrun" the collector, http://developer.apple.com/releasenotes/Cocoa/GCReleaseNotes/ index.html

It is, as you've noticed.

Marcel

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to