Hi.
Is it true that PHP takes less memory than JSP and .Net?
Hi.
Is it true that PHP takes less memory than JSP and .Net?
Memory use isn’t the enemy - memory waste is. An optimized PHP script making good use of APC cache can gobble up a lot of memory in order to deliver speed - since disk reads are the slowest thing a modern computer can do, and avoiding them is worth the effort.
I mean, my home dev computer has 8GB of RAM. Windows 7 uses pretty much all of it to load my frequently used applications before I ask for them, which makes for snappy system performance. And I can notice the advantage of this if I load some of my larger fantasy map files in Photoshop (some of which are over 6GB), and windows has to unload what it cached in order to give photoshop space to work with such a ginormous psd file. After I leave the program the lag as the cache is re-established is noticable - which is why I’m looking into getting an ssd drive.
Windows 7 doesn’t need to use that 8GB, but I bought it and I want to make use of it. Similarly, when I start apache (since my home machine isn’t a web server by purpose I don’t start apache until I’m doing work - every cycle counts in TF2 Arena ) my PHP scripts APC side look to grab about a gig for the APC caching. They will happily run with less, or without the cache, but if its there to be used and we can get a speed boost by using it, then use it. All this is admin configurable of course - if the memory needs to be reserved for other tasks then let that be.
No. Nothing is going to use more or less. It all depends on the developer and what tasks are being done.
Where did you read/hear this statement?
I thought as much.
Shame.
quoted from stackoverflow:
“minimal installation of jsp would require apache + tomcat which will be tomcat more then apache for php (unless you compile it by your self). not mentioning glasfish which requires 512MB memory and up”
Sadly, not authoritative, nor relevant.
Maybe I’m wrong, but I thought Tomcat is standalone server and does not require Apache. I used it only once, long time ago, so I may be wrong.
What I do know is that Tomcat is not required for JSP. Some Java Servlet server is required, but it does not have to be Tomcat.
Anyway, it’s very hard to tell if jsp needs more memory than php. There are different ways to run php like as apache mod_php, as fastcgi, with or without APC cache, so which one do you take as a benchmark?