0

I have been working on a project and Im hoping to get a gauge on possible performance issues before I put it in any production environment. Currently on my local machine Chrome's task manager says I average about 60000-70000 K for my memory footprint while the JavaScript Memory varies from about 5000-12000 K with 3000-9000 K live.

I dont really know what all of this means to me. My production environment will more than likely be on a single server with 16-32Gb of ram. The total number of sessions is likely to never exceed 100. Not sure if it matters but I use PHP $_SESSION to store session variables rather than cookies.

I understand this is a rather broad question but on its face does it look like there could be performance issues once maximum number of sessions is reached?

Other than switching to cookies, caching, and managing any memory leaks, is there anything I can do to lower my memory usage and mitigate any performance concerns?

This is not the only application that will be on the server but there is a large portion of the current memory that remains unused.

3
  • 4
    The server side view is completely different from the browser view. Think of the server as a giant template engine that dynamically creates pages and sends them to browsers. It's basically a short lived program, when the page is sent is is done. Performance can't be predicted very well however, it really depends on what you are doing ... first step is to measure the php server, not the browser. – Martin K Feb 20 '20 at 21:31
  • @MartinK thank you for the response. Could you elaborate some on the details of measuring the php server? – FamousAv8er Feb 20 '20 at 22:14
  • 1
    70,000K is roughly 70M, or .07G. On a 16-32 GB server you have plenty of room. The PHP side is much less that the number above. On paper you will be fine from a CPU/RAM standpoint. The big thing to test is network bandwidth and disk speed. Do some load testing with what you believe are normal for your app server. Check out k6.io if you don't know where to begin. – Berin Loritsch Feb 20 '20 at 22:45
2

The server's RAM and your Chrome tasks memory are other things. If you want decrease Chrome tasks memory, you will need to use little or compressed images, little fonts out of OS, styles and other files to render your website and you will need to use less HTML tags and ids to them and I think JS variables too use this memory. If you want decrease your server's RAM per request, you'll need to use less variables or use the gc_enable() function...

1
  • Exact. Note, however, that image compression has no effect on the memory: in order to show a highly compressed JPEG or even a 8-bit PNG, the browser would still need to convert it to a bitmap first. – Arseni Mourzenko Apr 26 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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