memory issue.

  • Thread starter Thread starter Alan Zhong
  • Start date Start date
A

Alan Zhong

we have our users from all 20 or 30 cities in the states, everyone is
connecting to our terminal server using thin clients.

the application i made is fair complicate and easily eats up 50 mb of
ram per user. i assume at least 100 users can connect and user the app
in the same time. then we need at least 5gb of ram... too much.

we might have to get 3 identical servers and group the users (but this
is not what we like to do.)

what's your opinions on this issues? is making the app MDI saving some
memory?
why is windows forms so resource demanding???
 
I would suggest to profile application before jumping to conclusions. MS CLR
Profiler can help.

HTH
Alex
 
Hello,

Without knowing the specifics about your application it is difficult to
provide suggesstions specific to your application. You will need to spend
some time figuring out what aspects of your application design are using the
memory that is not necessary. There is always the trade off of whether to
cache data and objects or reload them. The other thing to consider is when
to load objects and data, if you havn't already utilized the Lazy Load
pattern this may help you reduce the memory needs as well as the startup
time. If your application is already slimed down as far as possible, you
may have to reconsider your deployment pattern. I assume a web application
is out because you said this is a complicted application so that leaves us
with a Smart Client application.

If I were to be designing this application from the beginning I would
heavily consider developing it as a Smart Client application. As a Smart
Client the application is deployed to each client machine utilizing the
local resources of each client instead of one server. As you can imagine
this scales much better. In the past the industry moved there applications
over to the web mostly due to deployment issues of rich client application,
however, with today's technology we can more easily deploy and manage these
applications. Check out the Smart Client Developer Center for more
information http://msdn.microsoft.com/smartclient/.

Tom Krueger

Smart Client DevCenter - http://msdn.microsoft.com/smartclient/
Mobile DevCenter - http://msdn.microsoft.com/mobility

This posting is provided "as is" with no warranties and confers no rights.
 
If I were to be designing this application from the beginning I would
heavily consider developing it as a Smart Client application.

Well, there are legitimate reasons for using terminal server. For example,
perhaps the app needs to access a lot of data and is running over a slow
link.

What your reply fails to mention is that Windows Forms applications consume
a great deal more memory than native win32 applications, which is really the
issue here.

I would also be interested in any strategies for saving memory in this
scenario.

Tim
 
Alan Zhong said:
we have our users from all 20 or 30 cities in the states, everyone is
connecting to our terminal server using thin clients.

the application i made is fair complicate and easily eats up 50 mb of
ram per user. i assume at least 100 users can connect and user the app
in the same time. then we need at least 5gb of ram... too much.

Thinking about it, adding lots of RAM is probably the cheapest and easiest
solution.

A few other ideas:

- Convert to an ASP.NET application. Often relatively easy with .NET, as
non-visual code will work equally well behind a Web or Windows app

- If there is a lot of non-visual code, you could consider running it as a
service app and accessing it using .NET remoting (or by some other means).

- You can chip away at the memory usage using a profiler and careful coding.
Be rigorous in eliminating memory leaks. Don't keep forms in memory when not
displayed. Avoid large datasets. Etc.
what's your opinions on this issues? is making the app MDI saving some
memory?

I doubt MDI apps inherently have any lower memory requirement.
why is windows forms so resource demanding???

The demands of the CLR, plus application isolation, plus a rather
inefficient GUI framework. Meant to be somewhat improved in .NET 2.0.

Tim
..NET pros and cons
http://www.itwriting.com/phorum/list.php?f=6
 
Back
Top