user177050
user177050

Reputation:

Utilizing less memory in ASP.NET

My asp.net application is 3 static pages (no database) and it initializes with 48Mb of memory in use.

Can I configure the application to use less memory?

NB: I've already set the memory limits in IIS. I set maximum value for working process to 30 MB of physical memory.

What other ways can I employ to make ASP.NET use less memory?

Upvotes: 4

Views: 467

Answers (3)

Kev
Kev

Reputation: 119856

There will always be a baseline minimum amount of memory required to start even the most basic of ASP.NET applications. This is because there's not just your application but there's also the ASP.NET infrastructure, CLR and assorted plumbing being loaded into the worker process (and whatever memory reservations the managed heap is making up front).

Stop worrying about this until you encounter real memory pressure issues such as leaks. What you're seeing is normal.

Upvotes: 0

RickNZ
RickNZ

Reputation: 18652

You can't explicitly control how much memory ASP.NET uses. The only controls you have are at the IIS level, which basically tell IIS to recycle the worker process if the memory use exceeds a certain threshold.

If you want to reduce the memory footprint, you might try doing things like eliminating all of the HttpModules that you don't need: WindowsAuthentication, etc, etc.

Upvotes: 2

George Stocker
George Stocker

Reputation: 57907

You have three static pages (mean that pages that do not change), and you're using ASP.NET?

Why not just serve up three static HTML pages?

As far as making ASP.NET use less memory: Why? From a server standpoint, 48MB is nothing. If that's a constraint, then you have bigger issues than whether or not to use ASP.NET.

Upvotes: 9

Related Questions