Bug 21432 - High memory requirement
Summary: High memory requirement
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: WCF assemblies (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: Low normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-07-18 07:36 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2017-09-06 16:55 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
WCFService.zip (36.10 KB, application/zip)
2014-07-18 07:36 UTC, Rolf Bjarne Kvinge [MSFT]
Details
wcf-client.zip (you'll have to modify the IP to point to where you're running the server) (30.04 KB, application/zip)
2014-07-18 07:37 UTC, Rolf Bjarne Kvinge [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 21432 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Rolf Bjarne Kvinge [MSFT] 2014-07-18 07:36:02 UTC
Created attachment 7417 [details]
WCFService.zip

Fetching a 20mb byte array makes memory usage jump 150mb on the first request, and if subsequent requests are done the peak memory usage goes up to over 600mb.

This is a problem for mobile devices, where available memory is limited.

See attached test case.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2014-07-18 07:37:08 UTC
Created attachment 7418 [details]
wcf-client.zip (you'll have to modify the IP to point to where you're running the server)
Comment 2 Rolf Bjarne Kvinge [MSFT] 2014-07-18 07:40:53 UTC
Sample test case output:

Initial: GC.GetTotalMemory: 4 MiB
WCF download success! #1: GC.GetTotalMemory: 154 MiB
WCF download success! #2: GC.GetTotalMemory: 327 MiB
WCF download success! #3: GC.GetTotalMemory: 460 MiB
WCF download success! #4: GC.GetTotalMemory: 461 MiB
WCF download success! #5: GC.GetTotalMemory: 467 MiB
WCF download success! #6: GC.GetTotalMemory: 448 MiB
WCF download success! #7: GC.GetTotalMemory: 460 MiB
WCF download success! #8: GC.GetTotalMemory: 460 MiB
WCF download success! #9: GC.GetTotalMemory: 449 MiB
WCF download success! #10: GC.GetTotalMemory: 479 MiB
WCF download success! #11: GC.GetTotalMemory: 449 MiB
WCF download success! #12: GC.GetTotalMemory: 527 MiB
WCF download success! #13: GC.GetTotalMemory: 502 MiB
WCF download success! #14: GC.GetTotalMemory: 524 MiB
WCF download success! #15: GC.GetTotalMemory: 520 MiB
WCF download success! #16: GC.GetTotalMemory: 605 MiB
Comment 3 Miguel de Icaza [MSFT] 2014-07-27 22:02:29 UTC
This is a known issue on the WCF stack, but rewriting this code is far from easy, since this happens in a recursive process, and without a major restructuring of the code (coupled really with a major test suite for the touch points), it is not possible to build a streaming version of this.

This is probably the major bit that keeps WCF as an alpha-level library at this point.