0

I am developing a multilingual - multidomain site ( using i18n and Domain Access and several extra modules - CTools, Colorbox, etc. ). I have installed Devel because I thought the site was very memory consuming. I have seen peaks of PHP peak=40.25 MB in many of the pages. Is that too much? What happens if there are many concurrent users? Will the 128 PHP memory limit be able to handle many requests, will it use hard-drive memory instead of RAM ?

2
  • 1
    Please include a question in the title of your question. :)
    – Letharion
    Dec 11, 2014 at 17:47
  • @Cesar No problem there. Drupal Commerce is known to use much more at times, and doing module upgrades can really push it to the limit. A good caching strategy can help. Dec 12, 2014 at 3:59

1 Answer 1

2

The memory limit setting (often 128MB) is per process, so you're only using around third of it. If a single request needs more than 128MB of memory, it will fail. This doesn't appear likely in your case.

What happens if there are many concurrent users?

That depends on your total amount of RAM. You can in theory handle up RAM / 128 MB users.

If you have 15 concurrent users, each using 40MB, and you have 512 MB, then you'll go over that limit, because 40 * 15 = 600.

The normal configuration is then to use the hard-drive, often called swapping. This normally means the death of all performance, and should always be avoided, to the level where it's better to out right reject more incoming connections.

3
  • Thanks for the reply but I find difficult to reconcile this: "you're only using around third of it" with "If you go over that limit [...] should always be avoided", so I only understand that if I am expecting many concurrent users, I should allow for several Gigabytes of physical RAM. Is it right?
    – Cesar
    Dec 11, 2014 at 18:03
  • @Cesar I'm not sure what precisely you can't reconcile, but I updated the answer a bit, more clear now?
    – Letharion
    Dec 11, 2014 at 20:46
  • Yes, I realized later that it was clear from your original reply, but in this way it is better exposed, thanks for the update.
    – Cesar
    Dec 12, 2014 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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