Showing entries 241 to 250 of 301
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: PlanetMySQL (english) (reset)
PHP: "mysqlnd is awesome"

Things start rolling! mysqlnd is among the five most desired features for PHP 5.3 according to a PHP 5.3 Feature Summary email from Ilia, who - at the time of writing - was doing the release management of PHP.

Thanks everybody for your trust in mysqlnd and your support! We shall try not to disappoint you in the future and continue with the development. Of course, as the core feature mature more and more, we will try to spend time on implementing new, useful tricks and try to provide you with additional documentation, if time permits.

Meanwhile we are still looking for your feedback. Tell us about your positive and negative experiences with mysqlnd. Jürgen Krieger did so in his forums posting and concludes And i have to say that the …

[Read more]
PHP: 59 tuning screws for mysqlnd

59 - that is the number of statistics collected by mysqlnd. When I started writing this blog post, I hoped it would be easy going describing them. But it wasn’t. Some ten days ago, we’ve had 51 statistics and near zero tests for them. Now we have 59 statistics. And, in a certain way, every figure is a tuning screw in the hand of one who knows what they do.

I must confess, I grossly underestimated the time it takes to write only a few words about some of them. Here is a first batch of comments on some 20 figures. Already those some 20 figures should give you an idea how the mysqlnd statistics might help you with bottleneck analysis, monitoring. Or you use the statistics to identify scripts that select more rows than they consume, open more connections than needed, …

How to access client statistics with mysqlnd

Statistics are only available with mysqlnd. Statistics can be accessed using:

  • Per process: …
[Read more]
PHP: 59 tuning screws for mysqlnd

59 - that is the number of statistics collected by mysqlnd. When I started writing this blog post, I hoped it would be easy going describing them. But it wasn’t. Some ten days ago, we’ve had 51 statistics and near zero tests for them. Now we have 59 statistics. And, in a certain way, every figure is a tuning screw in the hand of one who knows what they do.

I must confess, I grossly underestimated the time it takes to write only a few words about some of them. Here is a first batch of comments on some 20 figures. Already those some 20 figures should give you an idea how the mysqlnd statistics might help you with bottleneck analysis, monitoring. Or you use the statistics to identify scripts that select more rows than they consume, open more connections than needed, …

How to access client statistics with mysqlnd

Statistics are only available with mysqlnd. Statistics can be accessed using:

  • Per process: …
[Read more]
PHP: mysqli_debug() - ?m?/dump memory information

Andrey has implemented a little mysqlnd only addition to mysqli_debug(): ‘m’ - dump memory information. It works like the other options described in PHP: Debugging ext/mysqli and mysqlnd with the only difference that it is only available with mysqlnd.

Without option ‘m’

This is a short example of mysqlnd freeing the meta data of a result set.

[...]
| | | >mysqlnd_res_meta::free
| | | | info : persistent=0
| | | | info : Freeing fields metadata
| | | | info : Freeing zend_hash_keys
| | | | info : Freeing metadata structure
| | | >mysqlnd_res_meta::free
[...]

Additional mysqlnd memory allocation debug information with option ‘m’

Same trace excerpt but with memory debugging turned on. The control string used for this trace was ‘t:O,/tmp/mysqlnd.trace:m’.

[...]
| | | >mysqlnd_res_meta::free
| | | | info : …
[Read more]
PHP: mysqli_debug() - ‘m’/dump memory information

Andrey has implemented a little mysqlnd only addition to mysqli_debug(): ‘m’ - dump memory information. It works like the other options described in PHP: Debugging ext/mysqli and mysqlnd with the only difference that it is only available with mysqlnd.

Without option ‘m’

This is a short example of mysqlnd freeing the meta data of a result set.

[...]
| | | >mysqlnd_res_meta::free
| | | | info : persistent=0
| | | | info : Freeing fields metadata
| | | | info : Freeing zend_hash_keys
| | | | info : Freeing metadata structure
| | | >mysqlnd_res_meta::free
[...]

Additional mysqlnd memory allocation debug information with option ‘m’

Same trace excerpt but with memory debugging turned on. The control string used for this trace was ‘t:O,/tmp/mysqlnd.trace:m’.

[...]
| | | >mysqlnd_res_meta::free
| | | | info : …
[Read more]
PHP: Debugging ext/mysqli and mysqlnd

One good news, one bad news - that’s the frank way we blog about mysqlnd. The last posting on significant memory savings (40%) and new tuning options was good news. The bad news: mysqlnd might have bugs. How to report and debug these bugs - using mysqli_debug() - is subject of this posting.

Where to send mysqlnd problem reports, how to contact

Due to a low feedback rate - which is disappointing in a certain way - we are in the comfortable situation that you may report issues or ask questions on pretty much every channel: on the mailing list php@lists.mysql.com, on http://bugs.mysql.com/, on http://bugs.php.net/, by private mail (georg/andrey/uwendel at mysql dot com) or even using a blog comment. Of course, …

[Read more]
PHP: Debugging ext/mysqli and mysqlnd

One good news, one bad news - that’s the frank way we blog about mysqlnd. The last posting on significant memory savings (40%) and new tuning options was good news. The bad news: mysqlnd might have bugs. How to report and debug these bugs - using mysqli_debug() - is subject of this posting.

Where to send mysqlnd problem reports, how to contact

Due to a low feedback rate - which is disappointing in a certain way - we are in the comfortable situation that you may report issues or ask questions on pretty much every channel: on the mailing list php@lists.mysql.com, on http://bugs.mysql.com/, on http://bugs.php.net/, by private mail (georg/andrey/uwendel at mysql dot com) or even using a blog comment. Of course, …

[Read more]
PHP: mysqlnd saves 40% memory, finally (new tuning options)!

mysqlnd saves memory. It consumes half as much memory as libmysql. This is what we have been convinced of. This is what we taught you. Then I tried to test it and made Andrey get nervous for a few hours… Meanwhile he is fine again and we can announce: mysqlnd saves memory, not only in theory, we tested it - we can proof it, can we?

The read-only variable trick

In theory it is so simple. libmysql is not part of PHP. If libmysql fetches any data from the MySQL Server, it puts the data into its own buffers. Then the data gets copied from the libmysql buffers into the ext/mysql resp. ext/mysqli data structures. Those data structures are “zvals“. “zval” is the name of the data structure that PHP uses internally - on the C level - to implement user variables. So, you have the data twice in memory: 1x inside the libmysql buffers and 1x inside …

[Read more]
PHP: mysqlnd saves 40% memory, finally (new tuning options)!

mysqlnd saves memory. It consumes half as much memory as libmysql. This is what we have been convinced of. This is what we taught you. Then I tried to test it and made Andrey get nervous for a few hours… Meanwhile he is fine again and we can announce: mysqlnd saves memory, not only in theory, we tested it - we can proof it, can we?

The read-only variable trick

In theory it is so simple. libmysql is not part of PHP. If libmysql fetches any data from the MySQL Server, it puts the data into its own buffers. Then the data gets copied from the libmysql buffers into the ext/mysql resp. ext/mysqli data structures. Those data structures are “zvals“. “zval” is the name of the data structure that PHP uses internally - on the C level - to implement user variables. So, you have the data twice in memory: 1x inside the libmysql buffers and 1x inside …

[Read more]
PHP: mysqli_stmt_get_result()

Have you ever been annoyed about the input and output binding that is part of Prepared Statements? Prepared Statements have their room in PHP and MySQL[i] for some good reasons. Though, I recall that I didn’t like the output binding when I tried them for the first time. I wanted the good old mysqli_fetch_assoc() to be available. Last year in November someone, I think it was Lukas (but don’t blame me, if I’m wrong), suggested to implement mysqli_stmt_get_results() with mysqlnd.

By help of the new function, you can create a …

[Read more]
Showing entries 241 to 250 of 301
« 10 Newer Entries | 10 Older Entries »