Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am considering using Apache 32-bit for a Moodle installation on a Windows 2008 R2 64-bit/16GB server. Since the available memory affects the number of concurrent of users that can be served, I was wondering how the 2GB memory limit on 32-bit Windows processes affects Apache+PHP.

Is it a collective limit for the whole server, or is it applied separately for each Apache child process/thread?

If it is separate, how many of those children are launched on Windows? One per request? One per processor core? Something in the middle? Is this somehow configurable?

share|improve this question
add comment

2 Answers 2

up vote 0 down vote accepted

Disclaimer: I'm not a Windows admin. I believe the most common setup like this with regard to Apache 2 is to use the winnt Multi Processing Module (MPM), with a configurable thread pool size (default is 250 or so). This means you'll have a single process with many threads, so that process will be the one subject to the 2G limitation.

One nice thing about Apache2 is that it supports different MPM schemes so you can choose the one that fits best. Here, it's likely (or maybe even has to be - not sure) the winnt MPM.

I hope this helps. --Matt

share|improve this answer
    
That seems to be the case. Fortunately, at its current workload the Apache server does not seem to need anywhere near 2GB of memory, so it should be fine... –  thkala Nov 11 '12 at 18:29
add comment

First of all, if you're asking the question, you might want to take a look at the memory limits for the various versions of Windows. Spawning multiple Apache processes won't do you much good if the OS limits you to 2 or 4 GB of RAM. Also, note that the memory limit per process is variable based on the application itself.

Secondly, the 2 GB per process limit applies to each process. Any process can have up to 2 GB of memory allocated to it, regardless of whether or not it's a child process of something else. Multi-threaded processes are still processes, so there's no side-stepping the limitation that way.

Finally, it doesn't seem like you understand the way Apache (or Windows?) processes work. There's no global configuration for launch [x] processes of [y] application, or [x] processes of [y] application per [z] cores, and you certainly don't get a new Apache process for every http request, so this part of the question is somewhat... unanswerable. The number of processes an application launches is defined by the application (and the user, to some extent). For example, each tab in IE is its own process, but each tab in Firefox is not.

I'd suggest, however, that sidestepping memory limitations by launching multiple instances of same process is probably not a good idea, and you should get a version of Windows that natively supports letting your application have as much memory as it actually needs (or can handle). Consider what's going to happen when you (or someone else) has to troubleshoot a problem, and steps into a webserver running 32 Apache instances to "get around" the 2 GB per process limit and make use of the maximum allowed OS limitation of 64 GB RAM. Someone's going to get murdered.

share|improve this answer
    
Uh, I think that you missed the point. For one, Windows 2008 R2 Server supports 32GB of physical memory - well over the 16 GB that I have. Second, the question is about what Apache is doing when on Windows, not just any random application. I am essentially asking about how Apache MPM is implemented on Windows, and whether the 32-bit memory limit is per server, per request or something in the middle... –  thkala Sep 6 '12 at 18:25
    
@thkala In that case, your question doesn't make sense, and I'm sticking with the assessment that you need a better understanding of "what a process is [in the context of a Windows OS]." –  HopelessN00b Sep 6 '12 at 19:06
    
I might be missing the point, but if you're deploying it on Win2k8 R2, which is x64, why not get an x64 version of your Moodle jobby (don't know what that is!). –  Simon Catlin Sep 6 '12 at 20:32
    
@SimonCatlin probably because it's not available or supported. 64 bit versions of PHP and Apache for Windows aren't as ubiquitous or debugged as they really should be by now... but using the 64 bit versions of PHP or Apache are something that should be worth considering to the OP. –  HopelessN00b Sep 6 '12 at 21:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.