I ran this string as a shell command: $cmd = 'ps -o%mem,rss,pid | grep ' . getmypid();
It shows the mem usage. I ran it in a bare script and it showed it's using just over 7000 kb of mem, 0.7% or total memory.
I guess the server has 1gig memory.
This seemed like a large chunk of memory for a bare bone script to be using, so I made a huge array(range(1, 10000)) to see if the mem usage jumped, just to make sure this was the right process. It spiked up by 800kb.
The question I have... isn't 7 megs rather much for a bare script process to take up??
How does php run each script? Does it start them as their own process, or as a thread from the main php process, or does what I just typed make me sound like a total noob.
Thanks for any insight, feel free to include extra details, nerd talk is my friend.
php mem usage
No replies to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users