Bug #71468 [NEW]: increased memory usage with mysqli in php 7
| From: | ryan dot brothers at gmail dot com | Date: | Wed, 27 Jan 2016 23:57:27 +0000 |
| Subject: | Bug #71468 [NEW]: increased memory usage with mysqli in php 7 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-198924@lists.php.net to get a copy of this message | ||
From: ryan dot brothers at gmail dot com
Operating system: Linux
PHP version: 7.0.2
Package: MySQLi related
Bug Type: Bug
Bug description:increased memory usage with mysqli in php 7
Description:
------------
I am seeing an issue in PHP 7 where large database queries are taking up
more memory compared to PHP 5.6.
In the below example, PHP 7 uses 8.3MB while PHP 5.6 only uses 1.8MB.
I have placed SQL to create a test table of 100,000 rows at
https://drive.google.com/uc?export=download&id=0B37DKbJklxg_Y3NadnRjc2tVbE0.
Is this expected behavior or an issue with PHP 7 memory usage?
Thanks for your help.
Test script:
---------------
<?php
$mysqli = new mysqli('localhost', 'test', 'test', 'test');
$mysqli->real_query("SELECT * FROM a");
$result = $mysqli->store_result();
echo memory_get_usage()."\n";
exit;
Expected result:
----------------
PHP 5.6.17:
1832472
PHP 7.0.2:
1832472 (or close to it)
Actual result:
--------------
PHP 5.6.17:
1832472
PHP 7.0.2:
8356704
--
Edit bug report at https://bugs.php.net/bug.php?id=71468&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71468&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71468&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71468&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71468&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71468&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71468&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71468&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71468&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71468&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71468&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71468&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71468&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71468&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71468&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71468&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71468&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71468&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71468&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71468&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71468&r=mysqlcfg