Re: Mid-term Update for Cycle Collector (Google Summer of Code Project)
| From: | Derick Rethans | Date: | Wed, 18 Jul 2007 08:23:34 +0000 |
| Subject: | Re: Mid-term Update for Cycle Collector (Google Summer of Code Project) | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-31038@lists.php.net to get a copy of this message | ||
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