Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Garbage collector patch
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 29 - Expand all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dmitry Stogov  
View profile  
 More options Dec 3 2007, 7:16 pm
Newsgroups: mailing.www.php-dev
From: dmi...@zend.com (Dmitry Stogov)
Date: Tue, 4 Dec 2007 08:16:20 +0800 (CST)
Local: Mon, Dec 3 2007 7:16 pm
Subject: Re: [PHP-DEV] Garbage collector patch
--------------000100010008040602010309
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

attached.

Dmitry.

--------------000100010008040602010309
Content-Type: text/plain;
 name="gc-5.3.diff.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="gc-5.3.diff.txt"

Index: configure.in
===================================================================
RCS file: /repository/php-src/configure.in,v
retrieving revision 1.579.2.52.2.77.2.6
diff -u -p -d -r1.579.2.52.2.77.2.6 configure.in
--- configure.in        6 Nov 2007 11:50:51 -0000       1.579.2.52.2.77.2.6
+++ configure.in        23 Nov 2007 12:32:59 -0000
@@ -1326,7 +1326,7 @@ PHP_ADD_SOURCES(Zend, \
     zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
     zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
     zend_ini.c zend_qsort.c zend_multibyte.c zend_ts_hash.c zend_stream.c \
-    zend_iterators.c zend_interfaces.c zend_exceptions.c zend_strtod.c)
+    zend_iterators.c zend_interfaces.c zend_exceptions.c zend_strtod.c zend_gc.c)

 if test -r "$abs_srcdir/Zend/zend_objects.c"; then
   PHP_ADD_SOURCES(Zend, zend_objects.c zend_object_handlers.c zend_objects_API.c \
Index: Zend/zend.c
===================================================================
RCS file: /repository/ZendEngine2/zend.c,v
retrieving revision 1.308.2.12.2.35.2.3
diff -u -p -d -r1.308.2.12.2.35.2.3 zend.c
--- Zend/zend.c 2 Nov 2007 19:40:37 -0000       1.308.2.12.2.35.2.3
+++ Zend/zend.c 23 Nov 2007 12:33:00 -0000
@@ -74,8 +74,21 @@ static ZEND_INI_MH(OnUpdateErrorReportin
 }
 /* }}} */

+static ZEND_INI_MH(OnUpdateGCEnabled) /* {{{ */
+{
+       OnUpdateBool(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
+
+       if (GC_G(gc_enabled)) {
+               gc_init(TSRMLS_C);
+       }
+
+       return SUCCESS;
+}
+/* }}} */
+
 ZEND_INI_BEGIN()
        ZEND_INI_ENTRY("error_reporting",                             NULL,           ZEND_INI_ALL,           OnUpdateErrorReporting)
+       STD_ZEND_INI_BOOLEAN("zend.enable_gc",                                "1",  ZEND_INI_ALL,           OnUpdateGCEnabled,      gc_enabled,     zend_gc_globals,        gc_globals)
        STD_ZEND_INI_BOOLEAN("zend.ze1_compatibility_mode",   "0",  ZEND_INI_ALL,           OnUpdateBool,   ze1_compatibility_mode, zend_executor_globals,  executor_globals)
 #ifdef ZEND_MULTIBYTE
        STD_ZEND_INI_BOOLEAN("detect_unicode", "1", ZEND_INI_ALL, OnUpdateBool, detect_unicode, zend_compiler_globals, compiler_globals)
@@ -822,6 +835,7 @@ ZEND_API char *get_zend_version(void) /*

 void zend_activate(TSRMLS_D) /* {{{ */
 {
+       gc_reset(TSRMLS_C);
        init_compiler(TSRMLS_C);
        init_executor(TSRMLS_C);
        startup_scanner(TSRMLS_C);
@@ -871,6 +885,12 @@ void zend_deactivate(TSRMLS_D) /* {{{ */

        zend_destroy_rsrc_list(&EG(regular_list) TSRMLS_CC);

+#ifdef ZEND_DEBUG
+       if (GC_G(gc_enabled) && !CG(unclean_shutdown)) {
+               gc_collect_cycles(TSRMLS_C);
+       }
+#endif
+
        zend_try {
                zend_ini_deactivate(TSRMLS_C);
        } zend_end_try();
Index: Zend/zend.h
===================================================================
RCS file: /repository/ZendEngine2/zend.h,v
retrieving revision 1.293.2.11.2.9.2.12
diff -u -p -d -r1.293.2.11.2.9.2.12 zend.h
--- Zend/zend.h 22 Nov 2007 13:27:11 -0000      1.293.2.11.2.9.2.12
+++ Zend/zend.h 23 Nov 2007 12:33:00 -0000
@@ -706,6 +706,7 @@ END_EXTERN_C()

 #define ZEND_MAX_RESERVED_RESOURCES    4

+#include "zend_gc.h"
 #include "zend_operators.h"
 #include "zend_variables.h"

Index: Zend/zend_builtin_functions.c
===================================================================
RCS file: /repository/ZendEngine2/zend_builtin_functions.c,v
retrieving revision 1.277.2.12.2.25.2.6
diff -u -p -d -r1.277.2.12.2.25.2.6 zend_builtin_functions.c
--- Zend/zend_builtin_functions.c       22 Nov 2007 13:27:11 -0000      1.277.2.12.2.25.2.6
+++ Zend/zend_builtin_functions.c       23 Nov 2007 12:33:00 -0000
@@ -85,6 +85,10 @@ static ZEND_FUNCTION(zend_test_func);
 static ZEND_FUNCTION(zend_thread_id);
 #endif
 #endif
+static ZEND_FUNCTION(gc_collect_cycles);
+static ZEND_FUNCTION(gc_enabled);
+static ZEND_FUNCTION(gc_enable);
+static ZEND_FUNCTION(gc_disable);

 #include "zend_arg_defs.c"

@@ -148,6 +152,10 @@ static const zend_function_entry builtin
        ZEND_FE(zend_thread_id,         NULL)
 #endif
 #endif
+       ZEND_FE(gc_collect_cycles, NULL)
+       ZEND_FE(gc_enabled, NULL)
+       ZEND_FE(gc_enable, NULL)
+       ZEND_FE(gc_disable, NULL)
        { NULL, NULL, NULL }
 };

@@ -166,6 +174,38 @@ ZEND_FUNCTION(zend_version)
 }
 /* }}} */

+/* {{{ proto int gc_collect_cycles(void)
+   Forces collection of any existing garbage cycles.
+   Returns number of freed zvals */
+ZEND_FUNCTION(gc_collect_cycles)
+{
+       RETURN_LONG(gc_collect_cycles(TSRMLS_C));
+}
+/* }}} */
+
+/* {{{ proto void gc_enabled(void)
+   Returns status of the circular reference collector */
+ZEND_FUNCTION(gc_enabled)
+{
+       RETURN_BOOL(GC_G(gc_enabled));
+}
+/* }}} */
+
+/* {{{ proto void gc_enable(void)
+   Activates the circular reference collector */
+ZEND_FUNCTION(gc_enable)
+{
+       zend_alter_ini_entry("zend.enable_gc", sizeof("zend.enable_gc"), "1", sizeof("1")-1, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME);
+}
+/* }}} */
+
+/* {{{ proto void gc_disable(void)
+   Deactivates the circular reference collector */
+ZEND_FUNCTION(gc_disable)
+{
+       zend_alter_ini_entry("zend.enable_gc", sizeof("zend.enable_gc"), "0", sizeof("0")-1, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME);
+}
+/* }}} */

 /* {{{ proto int func_num_args(void)
    Get the number of arguments that were passed to the function */
Index: Zend/zend_execute.c
===================================================================
RCS file: /repository/ZendEngine2/zend_execute.c,v
retrieving revision 1.716.2.12.2.24.2.8
diff -u -p -d -r1.716.2.12.2.24.2.8 zend_execute.c
--- Zend/zend_execute.c 22 Nov 2007 13:27:11 -0000      1.716.2.12.2.24.2.8
+++ Zend/zend_execute.c 23 Nov 2007 12:33:00 -0000
@@ -64,7 +64,7 @@ static void zend_extension_fcall_end_han

 #define TEMP_VAR_STACK_LIMIT 2000

-static inline void zend_pzval_unlock_func(zval *z, zend_free_op *should_free, int unref)
+static inline void zend_pzval_unlock_func(zval *z, zend_free_op *should_free, int unref TSRMLS_DC)
 {
        if (!Z_DELREF_P(z)) {
                Z_SET_REFCOUNT_P(z, 1);
@@ -76,6 +76,7 @@ static inline void zend_pzval_unlock_fun
                if (unref && Z_ISREF_P(z) && Z_REFCOUNT_P(z) == 1) {
                        Z_UNSET_ISREF_P(z);
                }
+               GC_ZVAL_CHECK_POSSIBLE_ROOT(z);
        }
 }

@@ -87,8 +88,8 @@ static inline void zend_pzval_unlock_fre
        }
 }

-#define PZVAL_UNLOCK(z, f) zend_pzval_unlock_func(z, f, 1)
-#define PZVAL_UNLOCK_EX(z, f, u) zend_pzval_unlock_func(z, f, u)
+#define PZVAL_UNLOCK(z, f) zend_pzval_unlock_func(z, f, 1 TSRMLS_CC)
+#define PZVAL_UNLOCK_EX(z, f, u) zend_pzval_unlock_func(z, f, u TSRMLS_CC)
 #define PZVAL_UNLOCK_FREE(z) zend_pzval_unlock_free_func(z)
 #define PZVAL_LOCK(z) Z_ADDREF_P((z))
 #define RETURN_VALUE_UNUSED(pzn)       (((pzn)->u.EA.type & EXT_TYPE_UNUSED))
Index: Zend/zend_execute_API.c
===================================================================
RCS file: /repository/ZendEngine2/zend_execute_API.c,v
retrieving revision 1.331.2.20.2.24.2.13
diff -u -p -d -r1.331.2.20.2.24.2.13 zend_execute_API.c
--- Zend/zend_execute_API.c     22 Nov 2007 13:27:11 -0000      1.331.2.20.2.24.2.13
+++ Zend/zend_execute_API.c     23 Nov 2007 12:33:00 -0000
@@ -420,15 +420,19 @@ ZEND_API void _zval_ptr_dtor(zval **zval
        if (Z_REFCOUNT_PP(zval_ptr) == 0) {
                zval_dtor(*zval_ptr);
                safe_free_zval_ptr_rel(*zval_ptr ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC);
-       } else if (Z_REFCOUNT_PP(zval_ptr) == 1) {
-               if ((*zval_ptr)->type == IS_OBJECT) {
-                       TSRMLS_FETCH();
+       } else {
+               TSRMLS_FETCH();

-                       if (EG(ze1_compatibility_mode)) {
-                               return;
+               if (Z_REFCOUNT_PP(zval_ptr) == 1) {
+                       if ((*zval_ptr)->type == IS_OBJECT) {
+                               if (EG(ze1_compatibility_mode)) {
+                                       return;
+                               }
                        }
+                       Z_UNSET_ISREF_PP(zval_ptr);
                }
-               Z_UNSET_ISREF_PP(zval_ptr);
+
+               GC_ZVAL_CHECK_POSSIBLE_ROOT(*zval_ptr);
        }
 }
 /* }}} */
Index: Zend/zend_gc.c
===================================================================
RCS file: Zend/zend_gc.c
diff -N Zend/zend_gc.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ Zend/zend_gc.c      23 Nov 2007 12:33:00 -0000
@@ -0,0 +1,515 @@
+/*
+   +----------------------------------------------------------------------+
+   | Zend Engine                                                          |
+   +----------------------------------------------------------------------+
+   | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+   +----------------------------------------------------------------------+
+   | This source file is subject to version 2.00 of the Zend license,     |
+   | that is bundled with this package in the file LICENSE, and is        |
+   | available through the world-wide-web at the following
...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Markus Fischer  
View profile  
 More options Dec 3 2007, 7:17 pm
Newsgroups: mailing.www.php-dev
From: mar...@fischer.name (Markus Fischer)
Date: Tue, 4 Dec 2007 08:17:10 +0800 (CST)
Local: Mon, Dec 3 2007 7:17 pm
Subject: Re: [PHP-DEV] Garbage collector patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Daniel Brown wrote:
>     I don't know about how it worked for anyone else, but the tables
> didn't display properly on Gmail, so I had a hard time keeping up with
> the performance differences.  If you have this in a separate file,
> could you send it to me as an attachment?

Same problem, all in one row, to "table" to read. We're having
non-apache application which run up to one hour to do their task and I
think our QA can test the new GC there (and memory consumption is an
issue there definitely).

thanks
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHVHWh1nS0RcInK9ARAmPlAJ9XnOzFmLSl8qDxY5bLBfJBcmgqRACfZnsn
R3cFSHfkMpoffq+f5vMxI3g=
=OkMW
-----END PGP SIGNATURE-----

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Andi Gutmans"  
View profile  
 More options Dec 3 2007, 8:29 pm
Newsgroups: mailing.www.php-dev
From: a...@zend.com ("Andi Gutmans")
Date: Tue, 4 Dec 2007 09:29:23 +0800 (CST)
Local: Mon, Dec 3 2007 8:29 pm
Subject: RE: [PHP-DEV] Garbage collector patch
------_=_NextPart_001_01C835F4.D63CFC6B
Content-Type: text/plain;
        charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

Sorry about that. Does the attached PDFed screenshot work for you?

Andi

------_=_NextPart_001_01C835F4.D63CFC6B
Content-Type: text/plain; charset=us-ascii

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Daniel Brown"  
View profile  
 More options Dec 3 2007, 8:31 pm
Newsgroups: mailing.www.php-dev
From: paras...@gmail.com ("Daniel Brown")
Date: Tue, 4 Dec 2007 09:31:59 +0800 (CST)
Local: Mon, Dec 3 2007 8:31 pm
Subject: Re: [PHP-DEV] Garbage collector patch
On Dec 3, 2007 4:49 PM, Derick Rethans <der...@php.net> wrote:

> On Mon, 3 Dec 2007, Andi Gutmans wrote:

> > Sorry about that. Does the attached PDFed screenshot work for you?

> No, as you can't attach files here....

> Derick

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

    I didn't think it would work on the list, but I figured if Andi
either sent it to me, or clicked Reply-All, either way it would be
delivered directly to my inbox, which it was.  So now it's here:
        http://www.pilotpig.net/pdfs/

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Andi Gutmans"  
View profile  
 More options Dec 3 2007, 8:32 pm
Newsgroups: mailing.www.php-dev
From: a...@zend.com ("Andi Gutmans")
Date: Tue, 4 Dec 2007 09:32:20 +0800 (CST)
Local: Mon, Dec 3 2007 8:32 pm
Subject: [PHP-DEV] Garbage collector patch
------_=_NextPart_001_01C835EF.BF4ABD7F
Content-Type: text/plain;
        charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

Hi all,

=20

Was hoping to send this off earlier but I was travelling for the past
week and had very limited email access.

As promised in the past few weeks we have spent a significant amount of
time in reviewing the garbage collector work and testing it in our
performance lab. Dmitry has been exchanging ideas and patches with David
Wang during this time. Suffice to say that as I've mentioned in the
past, memory management is an extremely sensitive piece of PHP, which is
why it was important for us to review this work in great depth before
committing it to the code base.

=20

The updated patch still retains the same algorithm as David's original
implementation however the data structures have been changed in order to
work faster and use less memory.

=20

The revised patch has the following advantages:
- It fixes several crash bugs

- Enhances performance by removing several unnecessary checks=20
- The memory overhead was reduced (from 12 to 4 bytes for each
heap-allocated zval)
- The speed of "clean" PHP code (code that doesn't create cycles) was
improved
 - Additional test cases were created

The end result is a more stable and faster GC patch. That said we have
yet to find real-life applications that create significant cycles which
would benefit from this patch. In fact as you'll see from the results
our tests show an increase in maximum memory use and slower execution
(to be fair they are marginal).

=20

We have tested both PHP_5_3 without any patches, the original patch and
the new patch.

=20

The following table shows execution time (seconds for N requests) and
slowdown.

=20

        PHP_5_3

Original GC patch=20

Current GC patch

        =20

=20

slowdown

=20

slowdown

bench

11,550

12,310

6,58%

12,170

5,37%

hello

8,781

8,852

0,81%

8,813

0,36%

xoops

128,500

135,100

5,14%

130,200

1,32%

static

18,540

20,840

12,41%

18,920

2,05%

qdig

29,320

30,270

3,24%

29,610

0,99%

qdig2

13,960

14,100

1,00%

14,090

0,93%

The next table shows memory usage in MB and overhead

=20

        PHP_5_3

Original GC patch

Current GC patch

        =20

=20

overhead

=20

overhead

hello

13,750

13,945

1,42%

13,765

0,11%

xoops

18,036

18,636

3,33%

18,568

2,95%

static

15,300

16,000

4,58%

15,308

0,05%

qdig

14,820

15,008

1,27%

14,828

0,05%

qdig2

14,824

15,012

1,27%

14,838

0,09%

=20

To summarize the patch lead to approx. 5% slowdown and 3% memory
overhead for typical applications (as always, you mileage may vary
depending on your system's architecture and OS although my guesstimate
is that you will see even worse results in a 64bit environment). We also
tested SugarCRM to get another sanity for these results and we got
similar results.

=20

I am not quite sure where this leaves us with this patch. On one hand I
think now the effort has been made it's a good thing to offer it as part
of PHP. The downside is of course some performance degradation and
possible instabilities as this patch continues to stabilize (it took
about two releases for us to stabilize the Zend Memory Manager even
after in-depth testing due to edge cases in allocation patterns and
various extensions, etc...).I'd be surprised if our team has found all
possible bugs.

=20

Personally I think the decision should be either in or out. Adding this
as a compile option is not a good idea as it would create binary
compatibility issues and would be a pain for the community. I think my
inclination is to commit the patch, not have it #ifdef'ed but always
compiled but to have the garbage collection itself turned off by default
(mainly for stability reasons. Note: the increased memory footprint and
performance loss also exists with the collection itself turned off). We
can turn it on when we're in dev for snapshots so that we iron out bugs.
That said, as you can see from the results most people and real-life
applications will be worse off than today.

=20

Thanks to David & Dmitry for working hard on this (and everyone else who
contributed).

=20

The stage is open for ideas/thoughts/suggestions J

Andi

------_=_NextPart_001_01C835EF.BF4ABD7F--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Daniel Brown"  
View profile  
 More options Dec 3 2007, 8:32 pm
Newsgroups: mailing.www.php-dev
From: paras...@gmail.com ("Daniel Brown")
Date: Tue, 4 Dec 2007 09:32:29 +0800 (CST)
Local: Mon, Dec 3 2007 8:32 pm
Subject: Re: [PHP-DEV] Garbage collector patch
    Markus,

    If for some reason the PDF attachment didn't come through to you
on the list, let me know and I'll upload it to one of my servers for
you to download and use, as well.

On Dec 3, 2007 4:40 PM, Daniel Brown <paras...@gmail.com> wrote:

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Daniel Brown"  
View profile  
 More options Dec 3 2007, 8:33 pm
Newsgroups: mailing.www.php-dev
From: paras...@gmail.com ("Daniel Brown")
Date: Tue, 4 Dec 2007 09:33:24 +0800 (CST)
Local: Mon, Dec 3 2007 8:33 pm
Subject: Re: [PHP-DEV] Garbage collector patch
On Dec 3, 2007 4:01 PM, Andi Gutmans <a...@zend.com> wrote:

    Andi,

    I don't know about how it worked for anyone else, but the tables
didn't display properly on Gmail, so I had a hard time keeping up with
the performance differences.  If you have this in a separate file,
could you send it to me as an attachment?  I have a few real-world
benchmarks I'd like to try from the angle of the shared-webhost
industry (lots of users with horrible code running simultaneously, et
cetera) which I'd like to compare to your notes.

    Thanks.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sean Coates  
View profile  
 More options Dec 3 2007, 8:33 pm
Newsgroups: mailing.www.php-dev
From: s...@caedmon.net (Sean Coates)
Date: Tue, 4 Dec 2007 09:33:38 +0800 (CST)
Local: Mon, Dec 3 2007 8:33 pm
Subject: Re: [PHP-DEV] Garbage collector patch

> Sorry about that. Does the attached PDFed screenshot work for you?

If only we knew how to publish documents on that 'web thing.........

(-:

S

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Edward Z. Yang"  
View profile  
 More options Dec 3 2007, 8:34 pm
Newsgroups: mailing.www.php-dev
From: edwardzy...@thewritingpot.com ("Edward Z. Yang")
Date: Tue, 4 Dec 2007 09:34:30 +0800 (CST)
Local: Mon, Dec 3 2007 8:34 pm
Subject: Re: [PHP-DEV] Garbage collector patch

Daniel Brown wrote:
> If for some reason the PDF attachment didn't come through to you
> on the list, let me know and I'll upload it to one of my servers for
> you to download and use, as well.

The PDF didn't make it through for me. Can you upload it?

--
 Edward Z. Yang                        GnuPG: 0x869C48DA
 HTML Purifier <http://htmlpurifier.org> Anti-XSS Filter
 [[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Derick Rethans  
View profile  
 More options Dec 3 2007, 8:34 pm
Newsgroups: mailing.www.php-dev
From: der...@php.net (Derick Rethans)
Date: Tue, 4 Dec 2007 09:34:39 +0800 (CST)
Local: Mon, Dec 3 2007 8:34 pm
Subject: RE: [PHP-DEV] Garbage collector patch

On Mon, 3 Dec 2007, Andi Gutmans wrote:
> Sorry about that. Does the attached PDFed screenshot work for you?

No, as you can't attach files here....

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Markus Fischer  
View profile  
 More options Dec 3 2007, 8:35 pm
Newsgroups: mailing.www.php-dev
From: mar...@fischer.name (Markus Fischer)
Date: Tue, 4 Dec 2007 09:35:11 +0800 (CST)
Local: Mon, Dec 3 2007 8:35 pm
Subject: Re: [PHP-DEV] Garbage collector patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

yes exactly, there was no PDF attachment. Interestingly the signature
was a separate attachment ...

thanks
- - Markus

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHVHi/1nS0RcInK9ARAp4KAKDKG2s1T4JZgPlAQJpsQsj7iVoSqACfQ9qt
2aF9QsCyV1tGU02vYInHQNU=
=AUjQ
-----END PGP SIGNATURE-----

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Andi Gutmans"  
View profile  
 More options Dec 3 2007, 8:35 pm
Newsgroups: mailing.www.php-dev
From: a...@zend.com ("Andi Gutmans")
Date: Tue, 4 Dec 2007 09:35:19 +0800 (CST)
Local: Mon, Dec 3 2007 8:35 pm
Subject: RE: [PHP-DEV] Garbage collector patch
That'd be great.
Dmitry, David, can you please send the updated patch to the list?

Andi

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

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Daniel Brown"  
View profile  
 More options Dec 3 2007, 8:35 pm
Newsgroups: mailing.www.php-dev
From: paras...@gmail.com ("Daniel Brown")
Date: Tue, 4 Dec 2007 09:35:22 +0800 (CST)
Local: Mon, Dec 3 2007 8:35 pm
Subject: Re: [PHP-DEV] Garbage collector patch
    That looks great, Andi.

    Thanks.

On Dec 3, 2007 4:38 PM, Andi Gutmans <a...@zend.com> wrote:

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ilia Alshanetsky  
View profile  
 More options Dec 3 2007, 9:44 pm
Newsgroups: mailing.www.php-dev
From: i...@prohost.org (Ilia Alshanetsky)
Date: Tue, 4 Dec 2007 10:44:58 +0800 (CST)
Local: Mon, Dec 3 2007 9:44 pm
Subject: Re: [PHP-DEV] Garbage collector patch
First of all big thanks for Dmitry and David for spending time on this  
project and continuing to improve the original patch. Based on the  
results so far, I think the patch does have a value, but certainly not  
in a general case. Relative simple scripts have little to gain from it  
and only to loose 3-5% of speed depending on a situation and given  
insubstantial memory gains it seems of little use in general case.  
That said, there are complex applications (perhaps unnecessarily  
so ;-) ) that could see some real benefits from this code. My  
suggestion is that we make this feature a compile time flag, that's  
off by default and people who feel that their applications warrant a  
garbage collector can enable it for their install and at the same time  
those who don't (general case) have no penalties of having it in place.

On 3-Dec-07, at 4:01 PM, Andi Gutmans wrote:

Ilia Alshanetsky

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Cristian Rodriguez"  
View profile  
 More options Dec 3 2007, 10:05 pm
Newsgroups: mailing.www.php-dev
From: judas.iscari...@gmail.com ("Cristian Rodriguez")
Date: Tue, 4 Dec 2007 11:05:18 +0800 (CST)
Local: Mon, Dec 3 2007 10:05 pm
Subject: Re: [PHP-DEV] Garbage collector patch
2007/12/3, Ilia Alshanetsky <i...@prohost.org>:

> I think the patch does have a value,

yes, it does, what worries me is the introduction of yet another
non-sense ini setting that modified the very engine behaviuor.. I
think we all agree that there are way too many of those do we ?

. My

> suggestion is that we make this feature a compile time flag.

My suggestion is not to add any compile time flag, either provide it or dont.

> and people who feel that their applications warrant a
> garbage collector can enable it for their install and at the same time
> those who don't (general case) have no penalties of having it in place.

People more commonly uses PHP from distributors, in binary form.. they
dont usually decide what is enabled or not, so you have to either
reccommend this feature or mark it clearly as untrusted, experimental.

such switches only add more complexity, confusion for users and
addtional trouble to distributors.

my 2CLP.

--
http://www.kissofjudas.net/

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Steph Fox"  
View profile  
 More options Dec 3 2007, 11:41 pm
Newsgroups: mailing.www.php-dev
From: st...@zend.com ("Steph Fox")
Date: Tue, 4 Dec 2007 12:41:57 +0800 (CST)
Local: Mon, Dec 3 2007 11:41 pm
Subject: Re: [PHP-DEV] Garbage collector patch

> such switches only add more complexity, confusion for users and
> addtional trouble to distributors.

FWIW, amen to that.

- Steph

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ronald Chmara  
View profile  
 More options Dec 4 2007, 1:07 am
Newsgroups: mailing.www.php-dev
From: r...@Opus1.COM (Ronald Chmara)
Date: Tue, 4 Dec 2007 14:07:54 +0800 (CST)
Local: Tues, Dec 4 2007 1:07 am
Subject: Re: [PHP-DEV] Garbage collector patch

On Dec 3, 2007, at 1:01 PM, Andi Gutmans wrote:

I'm really hesitant to even *mention* this idea, but....

Could "alternate" memory management systems be made available via  
PECL add-ons, or, more to the point:
What is the *actual cost and complexity* involved in implementing  
(possibly many) different user-selectable memory management systems,  
and what other future benefits/drawbacks might we see by doing such a  
thing? (GC is big now, but what about memory pools per mod_auth user,  
or SHM/SEM pools, or tuning amounts of memory per function, etc...)

I will now apologize to everybody who I just made cry, scream, or  
damage their furniture, as I didn't mean to hurt you, just trying to  
stimulate ideas.

-Ronabop

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Andi Gutmans"  
View profile  
 More options Dec 4 2007, 1:32 am
Newsgroups: mailing.www.php-dev
From: a...@zend.com ("Andi Gutmans")
Date: Tue, 4 Dec 2007 14:32:26 +0800 (CST)
Local: Tues, Dec 4 2007 1:32 am
Subject: RE: [PHP-DEV] Garbage collector patch

Hi Ronald,

PHP 5.2.x already supports the ability to hook in different "page"
managers. In PHP 5.3 you can also override the memory allocation
functions. However, this would not include garbage collection like
algorithms which actually require changes in the core PHP data type such
as zvals. In fact the garbage collection adds memory to the basic
datatypes which is why I suggested to either always make these changes,
or don't make them so that we retain binary compatibility across all
builds of PHP.
So overriding basic memory allocation functions, yes, ability to provide
various GC implementations, no.

Andi

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ronald Chmara  
View profile  
 More options Dec 4 2007, 2:47 am
Newsgroups: mailing.www.php-dev
From: r...@Opus1.COM (Ronald Chmara)
Date: Tue, 4 Dec 2007 15:47:49 +0800 (CST)
Local: Tues, Dec 4 2007 2:47 am
Subject: Re: [PHP-DEV] Garbage collector patch
On Dec 3, 2007, at 10:30 PM, Andi Gutmans wrote:

Okay, so, without this patch, I can allocate mem, and destroy it, on  
a per page level, but not on a zval level, and the choice is:
a) zval (etc.) destruction with this patch, which has a 5% speed hit  
at times (varies per test)
b) no patch, no change
c) something which hasn't been thought of yet?

I'd have to (sadly) ask that anything that slows down PHP by 5%, to  
improve performance for programmers that, uhm, "leak" or otherwise  
gobble RAM, that they, uhm, refactor their code as professional  
programmers.

Thanks for clearing it up for me, Andi.

-Bop

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Antony Dovgal  
View profile  
 More options Dec 4 2007, 3:32 am
Newsgroups: mailing.www.php-dev
From: t...@daylessday.org (Antony Dovgal)
Date: Tue, 4 Dec 2007 16:32:11 +0800 (CST)
Local: Tues, Dec 4 2007 3:32 am
Subject: Re: [PHP-DEV] Garbage collector patch
On 04.12.2007 06:00, Cristian Rodriguez wrote:

> such switches only add more complexity, confusion for users and
> addtional trouble to distributors.

... which I believe are going to enable this flag by default anyway,
because they don't care about performance too much.

So I agree, either do it or not, yet another engine mode is bad idea.

--
Wbr,
Antony Dovgal

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Alexey Zakhlestin"  
View profile  
 More options Dec 4 2007, 4:48 am
Newsgroups: mailing.www.php-dev
From: indey...@gmail.com ("Alexey Zakhlestin")
Date: Tue, 4 Dec 2007 17:48:44 +0800 (CST)
Local: Tues, Dec 4 2007 4:48 am
Subject: Re: [PHP-DEV] Garbage collector patch
I believe this has to be done and it should be always on.
Having less headache is good. I will find other ways to speed up my projects

On 12/4/07, Antony Dovgal <t...@daylessday.org> wrote:

--
Alexey Zakhlestin
http://blog.milkfarmsoft.com/

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jani Taskinen  
View profile  
 More options Dec 4 2007, 6:44 am
Newsgroups: mailing.www.php-dev
From: jani.taski...@sci.fi (Jani Taskinen)
Date: Tue, 4 Dec 2007 19:44:08 +0800 (CST)
Local: Tues, Dec 4 2007 6:44 am
Subject: Re: [PHP-DEV] Garbage collector patch

On Tue, 2007-12-04 at 00:00 -0300, Cristian Rodriguez wrote:
> 2007/12/3, Ilia Alshanetsky <i...@prohost.org>:
> > I think the patch does have a value,

> yes, it does, what worries me is the introduction of yet another
> non-sense ini setting that modified the very engine behaviuor.. I
> think we all agree that there are way too many of those do we ?

Yup. :)

> > My
> > suggestion is that we make this feature a compile time flag.

> My suggestion is not to add any compile time flag, either provide it or dont.

I have to agree. Either it's in or not. We've had enough trouble with
giving too much rope for people already..

--
Patches/Donations: http://pecl.php.net/~jani/

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Zülke  
View profile  
 More options Dec 4 2007, 9:35 am
Newsgroups: mailing.www.php-dev
From: d...@bitxtender.com (David Zülke)
Date: Tue, 4 Dec 2007 22:35:27 +0800 (CST)
Local: Tues, Dec 4 2007 9:35 am
Subject: Re: [PHP-DEV] Garbage collector patch
I could be wrong, of course, but my guess is that the ~3% speed decrease
a) is not really significant to 95% of the users (I mean _really_ =20
significant; of course, everyone is going to whine about it first) and
b) is going to be eliminated over time

david

Am 04.12.2007 um 03:43 schrieb Ilia Alshanetsky:

--
David Z=FClke
d...@bitxtender.com
Tel: +49 (0)89 57 08 15 15
bitXtender GbR
Paul-Heyse-Stra=DFe 6
80336 M=FCnchen

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Antony Dovgal  
View profile  
 More options Dec 4 2007, 10:58 am
Newsgroups: mailing.www.php-dev
From: t...@daylessday.org (Antony Dovgal)
Date: Tue, 4 Dec 2007 23:58:15 +0800 (CST)
Local: Tues, Dec 4 2007 10:58 am
Subject: Re: [PHP-DEV] Garbage collector patch
On 04.12.2007 18:31, Andi Gutmans wrote:

> You may be right longer term but shorter term I still believe there may be stability issues with this patch some of which we haven't figured out. Although we did testing and found crash bugs I wouldn't trust our level of testing to deem it stable. If we go down the route of always on we could have a hidden ini file (not listed in php.ini-dist and phpinfo()) which we can advise to turn off if something goes wrong and once we can enough confidence that there aren't any lurking bugs we could remove it.

You mean provide an ini setting to be able to turn it Off?
But why do you call it "always On" then?
And what's the difference comparing to what you've proposed earlier?

Concerning the stability issues, I'd say we have quite good chance
to make it stable enough, as (I hope) 5.3.0 is not going to be released
for at least several months more.

Companies that are especially concerned of performance/stability
are encouraged to step forward and give us a hand.

--
Wbr,
Antony Dovgal

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stanislav Malyshev  
View profile  
 More options Dec 4 2007, 1:35 pm
Newsgroups: mailing.www.php-dev
From: s...@zend.com (Stanislav Malyshev)
Date: Wed, 5 Dec 2007 02:35:50 +0800 (CST)
Local: Tues, Dec 4 2007 1:35 pm
Subject: Re: [PHP-DEV] Garbage collector patch

> that could see some real benefits from this code. My suggestion is that
> we make this feature a compile time flag, that's off by default and

What about binary compatibility?

--
Stanislav Malyshev, Zend Software Architect
s...@zend.com   http://www.zend.com/
(408)253-8829   MSN: s...@zend.com

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 29   Newer >
« Back to Discussions « Newer topic     Older topic »