php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69389 Operations taking much longer after upgrade
Submitted: 2015-04-06 23:59 UTC Modified: 2021-09-12 04:22 UTC
From: fredsmelo at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: mongo (PECL)
PHP Version: 5.4.39 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-04-06 23:59 UTC] fredsmelo at gmail dot com
Description:
------------
Hello there folks. This is my first bug report so please go easy on me, I'll try my best anyway. 

Just recently I've updated the mongo package (https://pecl.php.net/package/mongo) from version 1.5.1 to 1.6.3 and, as soon as I did it, all operations started to take longer (like 30x longer, it used to take 10ms, now it takes around 300ms). I went back to version 1.5.1 and started updating one version at a time. By doing so I figured this started to happen on version 1.5.6, up to version 1.5.5 the performance was just fine. 

Here we have a gap where I installed ver 1.5.5
https://www.dropbox.com/s/9uqo1rf6q5uwvj3/Screen%20Shot%202015-04-06%20at%204.21.42%20PM.png?dl=0

And here we have the performance on ver 1.5.6
https://www.dropbox.com/s/oqv0ty7fiqpo5if/Screen%20Shot%202015-04-06%20at%204.21.34%20PM.png?dl=0

This script has simple findOne operations.






Test script:
---------------
I'm placing a generic findOne query on mongo, you could see the problem with any find operation, though. 

<?php

$articles = $mongo->my_db->articles;

$article = $articles->findOne(array('_id' => new MongoId('47cc67093475061e3d9536d2')));

?>

Expected result:
----------------
I expect the operation to take about 10ms as it used to take. 

Actual result:
--------------
The actual result can be seeing on the screenshot mentioned above. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-07 13:09 UTC] danack@php.net
If you can reproduce the error in a command line script, you can 'easily' find out where the extra time is being used by using strace http://linux.die.net/man/1/strace


If you run something like "strace -c /usr/bin/php testscript.php" it will show you where all the time is being used by system calls, and you'll be able to see in which system call the extra 300ms is being spent, if you compared it to the previous version.

If you then call strace again without the '-c' flag, you'll get a full dump of the system calls to get even more info.
 [2021-08-30 15:45 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-08-30 15:45 UTC] cmb@php.net
Is this still an issue with the latest mongo (1.6.16)?
 [2021-09-12 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 20:01:29 2024 UTC