Minimal Windows 2008 or 2012 memory usage

22,080

Solution 1

I just did a clean installed of Web Server 2008R2 Core in a virtual machine. It is currently using 253MB of RAM exactly. I do not curently have access to a Server 2012 .iso to test.

The thing is with Server Core is that there's is no GUI which cuts down on RAM (and attack surface) but you have to get quite adept with managing it. As explorer does not run it might make your web server software (whatever you chose to use) difficult or impossible to use. Using IIS or any other web server would make the RAM increase significatly - I would say 256MB RAM for a miniumal install, and 512MB for a "useable" server - more if you were running some sort of database.

Of course, you'd likely be better off with using some Linux variant such as CentOS for running a web server. When I got my first VPS I went for Windows over Linux as I was more comfortable with using it and the cost of me paying for the windows license was made up by the fact I didn't spend any time fumbling around with CentOS and risking a compramised server.

I just went back to the VM after typing that and it has gone up to 272MB.

Solution 2

In my experience both OSes are fairly low usage, for a Windows box. An even smaller foot print install would be to use the core installation mode to remove the need for an actual Windows UI layer as well, however that may not play nice with your 3rd Party web server.

In all reality though, if you plan to use a non-IIS web server there really aren't any reasons not to use a *NIX OS and run the web server on those boxes. Linux virtual machines are often cheaper than the Windows counterparts simply because the cost per hour includes the Windows licensing.

Regardless of all of this, you would simply need to understand the minimum amount of RAM allowed by each OS and then determine the minimums for your web servers and other applications. Of course if you use the minimums you can expect to see low to horrible performance across the board.

Solution 3

I just took a VM with 2012 Server Core, SQL-2008 R2 and several ASP.NET sites on IIS and limited the RAM to 256MB, it still all works but it is noticeably slower.

I would set up a test VM with your applications and then run some performance and scaling tests against different amounts of RAM.

I would recommend the core option as well, even though I don't think the memory footprint is that much lower. Even on a Full-GUI server, Windows Explorer is usually not loaded. But when you log in Explorer needs more memory than cmd.exe.

Server 2012 core has a bigger storage footprint than 2008 R2 core, but I think the memory footprint is about the same. I have no hard numbers for this though.

Share:
22,080

Related videos on Youtube

Eric Grange
Author by

Eric Grange

Updated on September 18, 2022

Comments

  • Eric Grange
    Eric Grange over 1 year

    What are the minimal memory usage for Windows 2008 & 2012 server editions?

    I'm referring to all things OS-related. The machine would be a VM with a dedicated web server software, that wouldn't rely on the OS (ie. no IIS, no domains, minimal local database) and wouldn't use much memory (less than 50 MB), though CPU usage might occasionnally spike under load.

    I'm asking because there are options for hosting where you're charged by the MB of RAM, and for a such a low-overhead server, all the RAM usage would essentially be used by idle OS services. So anything that can lower the baseline cost would be great.

    Is 2008 a better starting point for low memory usage? Of can 2012 be coerced lower?

    Any pointers on the above?

    PS: I've managed to get a standard Windows 2008 down to 192 MB Physical when no RDP sessions are active, by stopping all unnecessary services, disabling COMPort, Floppy & CDROM devices, and minimizing cache file size with the SetSystemFileCacheSize() API.

    • Brent Pabst
      Brent Pabst over 11 years
      Just a note on this question but I would guess that it may get closed. It is borderline shopping/product recommendation.
    • Peter Hahndorf
      Peter Hahndorf over 11 years
      He is asking for the amount of RAM required, how is that a shopping/product question?
    • Brent Pabst
      Brent Pabst over 11 years
      @PeterHahndorf As I said, borderline. I personally think asking between different versions of a product is still a product recommendation question, especially when the memory usage numbers are available through Microsoft's website.
    • Eric Grange
      Eric Grange over 11 years
      @Brent You mean between 2008 and 2012? Als usage numbers are not available through Microsoft's website (there only provide rough, essentially meaningless requirements AFAICT)
    • Brent Pabst
      Brent Pabst over 11 years
      @EricGrange Since you didn't provide any meaningful software requirements for RAM usage the best we can provide is the bare Microsoft recommendations. 50MB for the web server doesn't necessarily include the application itself. If its just HTML that's fine, but you didn't specify one way or the other.
    • Eric Grange
      Eric Grange over 11 years
      @Brent It's a dedicated web server software as I wrote, 50 MB is the total RAM for the server and the application it serves, and it's a conservative figure (20 MB was the observed usage for stress tests under JMeter).
  • Eric Grange
    Eric Grange over 11 years
    Ideally, yes, but the server software is Windows-based, and the hosts I've seen only had a Windows option for the purely RAM & CPU-usage based hosting anyway (it's based in hyper-v dynamic ram allocation) The prices are based on the RAM you actually use, the VM itself can dynamically go up to 2 or 4 GB, but the more you use, the more expensive it gets.
  • Brent Pabst
    Brent Pabst over 11 years
    What host system are your looking at? AWS and Azure are all per compute hour charges.
  • Eric Grange
    Eric Grange over 11 years
    It's neither of those (Azure even charges stopped VMs...), it's Ikoula, and you're charged by measured CPU, RAM, I/O, disk usage & bandwidth.
  • Brent Pabst
    Brent Pabst over 11 years
    Ah, a true pay as you go provider. That is an interesting model and does change things a bit. I would assume you're biggest hit may end up being Disk I/O unless you can somehow cache the files being served, but that then hits the memory side of things. Makes it a bit more tricky.
  • Eric Grange
    Eric Grange over 11 years
    They don't offer core as option... I was able to get a standard 2008R2 down to 364 MB of OS usage by stopping a few services and limiting cache size (measured after a few hours of moderate use). For admin account, I made a script that starts a console and kills explorer.exe (explorer can be restarted from the console if needed). Couldn't get 2012 below 450 MB, but I don't know that OS as well.
  • Eric Grange
    Eric Grange over 11 years
    The VM is capped at 2GB, but dynamically resized, and you pay for all the RAM above 512 MB. The rate is rather steep: running it above 1 GB 24/7 makes it more expensive than a low-end dedicated. Though the VMs in their "pay as you go" is quite faster than a low-end dedicated, so... choices, choices!
  • abc
    abc about 7 years
    For info, a new Server 2012 with GUI eats around 600MB of ram. After updates, and a few apps loaded (nothing third party, just logged in), it's 900MB. So 2GB should be enough for a minimal deployment. Especially in the SSD era, where swapping is not that much of a deal anymore.