Page 1 of 1

Memory usage in Windows Server 2008 R2

PostPosted: Mon Jan 24, 2022 9:48 am
by Mick23
Hi everybody,
we have a problem of "memory usage" with an application we develop that uses Winform version of CefSharp for some of our customers that have old servers running Windows Server 2008 R2.

Afraid that our application could have problems I've then made some test using the CefSharp.MinimalExample.Winform.net472.exe and discovered that there is the same problem and it appears with x86 build, while with x64 things runs better.

The problem is that in x86 build each CefSharp.BrowserSubprocess uses 150-170 Mb of memory, while in x64 mode each Subprocess uses approx 30-45 Mb.
In more recent Operating Systems (win 2012, 2016) this problem doesn't exixts even with x86 builds.

For many reasons we cannot build our application in x64 mode: I'm only asking if this is a known problem concerning Windows Server 2008 R2 and if there is some useful solution apart asking the customers to upgrade their O.S. :)

I've attached a couple of images showing the memory usage.

thanks in advance,
Michele

Re: Memory usage in Windows Server 2008 R2

PostPosted: Mon Jan 24, 2022 3:27 pm
by amaitland
I suspect if you ran Chromium 32bit at the same version you'd see the same behaviour. I suspect chromium code changes would be required.

You can test with a vanilla chromium build from https://chromium.woolyss.com/#windows-32-bit

Re: Memory usage in Windows Server 2008 R2

PostPosted: Tue Jan 25, 2022 8:27 am
by Mick23
Hi,
I've downloaded the "vanilla chromium build" and made the same test as before launching both CefSharpMinimalExample and the Chrome/Chromium build in their 32bit versions (they are using both v.97.of chromium).
The result can be seen in the image below.

Re: Memory usage in Windows Server 2008 R2

PostPosted: Tue Jan 25, 2022 2:24 pm
by amaitland
You'll need to run chromium with --no-sandbox command line argument

Re: Memory usage in Windows Server 2008 R2

PostPosted: Wed Jan 26, 2022 5:16 am
by Mick23
Done.
in the attached image I've captured the running of three cases:

1) Customer with our current application (the lines with the username masked for privacy): our application is a simple basic winform application used to open custom internal web pages, based on CefSharp
2) Other CefSharp.Subprocess are from CefSharpMinimalExample run with --no-sandbox
3) Chrome processes are from vanilla chrome/chromium run with --no-sandbox

in fact when vanilla chromium is run with --no-sandbox a warning message is shown (see below) and with or without --no-sandbox the behaviour is always the same in terms of memory usage (lower memory usage)

Re: Memory usage in Windows Server 2008 R2

PostPosted: Wed Jan 26, 2022 2:47 pm
by amaitland
Interesting, possibly something CEF specific then, you'll need to test with the CEF Sample application. See https://github.com/cefsharp/CefSharp/bl ... ameworkcef for details.

I haven't got around to updating the links yet for v97, you can download the 32bit version using https://cef-builds.spotifycdn.com/cef_b ... nt.tar.bz2