On Sat, 14 Jul 2007, Rasmus Lerdorf wrote:

> David Wang wrote:
> >> Is it possible that total server throughput with gc could actually be
> >> better than unmodified php by preventing swapping at some higher
> >> level of concurrent requests?
> > 
> > Yes, that's certainly true if it becomes the case that concurrent
> > requests take up so much memory that they induce swapping! If that
> > ever happens, the system will basically come to a complete standstill.
> > No matter what the GC does, it still will be effectively infinitely
> > faster than saving and retrieving information from the hard drive.
> 
> It is still extremely rare for code to have cyclic references.  So while
> GC could prevent swapping in the case of a malicious user, or in the
> case of a coding mistake, I don't think the general case of typical code
> running under normal circumstances would consume less memory with GC
> enabled.

It all depends on the code of course - things that do parsing usually 
tend to have cyclic structures (to keep a link to the "parent").

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to