Bug #54982
closedEpic #55070: Workpackages
Epic #55065: WP: Overall System Performance (Backend and Frontend)
Bug #52949: Speed decrease since 4.5
Performance of eID-scripts in TYPO3 6.2
0%
Description
Compared to TYPO3 4.5 EId calls in TYPO3 6.2 are very slow.
I made some tests with a simple extension which only includes and executes a mostly empty php file via the Eid mechanism.
tests where made with apache bench on a Windows machine.
ab comandline was: ab.exe -n 1000 -c 8 "url"
APC off requests/s TYPO3 6.2 20 TYPO3 4.5.30 79 APC On (shm size = 64m) requests/s TYPO3 6.2 23 TYPO3 4.5.30 147
you see that 6.2 is roundabout 4 times slower with APC disbled and more than 6 times slower with APC enabled.
If I analyze this calls with a profiler I see that most of the time is wasted in the classloader cache.
Possible solutions:
optimize the classloader performance.
move the Eid Hook to an earlier place in the bootstrapping sequence.
Files
Updated by Alexander Opitz almost 11 years ago
Hi Rupert,
I'd like to take a look into this. Can you please add your Test Extension as zip file here?
Also I'd like to know more about your used software versions of PHP, apc, apache.
I don't think it will work to move the Eid hook in bootstrapping before class loader, course else we wouldn't have classes. ;)
Updated by Oliver Hader over 10 years ago
- Status changed from New to Needs Feedback
Is this still valid? A lot of things have been optimized with the help of the performance workpackage in February and March 2014...
Updated by Stephan Großberndt over 10 years ago
- File eid_test.zip eid_test.zip added
This is still valid. Even if the difference is less now - still about 2 times slower with and without APC.
I have created a eID-Test-Extension with four very simple test cases:
Requests per second [#/sec] (mean) Version: Non-APC || APC
/index.php?eID=eid_test 4.5.36-dev: 81.87 || 95.25 6.2.-dev: 42.51 || 49.87
/index.php?eID=eid_test_db 4.5.36-dev: 74.19 || 92.10 6.2.-dev: 40.27 || 45.61
/index.php?eID=eid_test_feuser 4.5.36-dev: 45.05 || 74.01 6.2.-dev: 30.28 || 37.88
/index.php?eID=eid_test_db_feuser 4.5.36-dev: 81.52 || 100.15 6.2.-dev: 41.07 || 47.75
The extension directory also contains a logs/eid_test.bat with the ab.exe calls and subdirectories logs/apc logs/non-apc with the full ab.exe reports
These tests were run with xampp-win32-1.8.2-6-VC9-installer.exe - Apache 2.4.10, MySQL 5.5.39, PHP 5.4.31
APC tests were run with php_apc-3.1.10-5.4-vc9-x86.zip - ts/php_apc.dll, apc.shm_size = "256M"
As you can see there is a huge performance penalty if you use tslib_eidtools::initFeUser() and do not use tslib_eidtools::connectDB() before!
Updated by Stephan Großberndt over 10 years ago
So I just found out it is not necessary since 6.1 to do tslib_eidtools::connectDB(), it just does \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction in 6.1 and later.
So you may just ignore the _db tests, but anyway - the difference is there.
Time per request: [ms] (mean) Version: Non-APC || APC
/index.php?eID=eid_test_feuser 4.5.36-dev: 177.570 || 108.093 6.2.-dev: 264.232 || 211.180
Updated by Alexander Opitz over 10 years ago
- Status changed from Needs Feedback to Accepted
- Assignee set to Alexander Opitz
- Target version deleted (
6.2.0)
Updated by Marcus Schwemer almost 10 years ago
Hi,
we run into the same issue using the extension "powermail_cond".
It would be very good if there would be some progress.
TIA
Marcus
Updated by Wouter Wolters almost 10 years ago
- Status changed from Accepted to Needs Feedback
Please re-check the speed with 6.2.10. With the new classloading mechanism this should be faster now.
Updated by Stephan Großberndt almost 10 years ago
- Subject changed from Very bad EId Performance in TYPO3 6.2 to Very bad eID-Performance in TYPO3 6.2
On the same machine as before:
Requests per second [#/sec] (mean) Version: No-Cache || APC || PHP 5.5 opcache /index.php?eID=eid_test 4.5.36-dev PHP 5.4: 81.87 || 95.25 || - 6.2.4 PHP 5.4: 42.51 || 49.87 || - 6.2.4 PHP 5.5: 61.30 || - || 332.89 6.2.11-dev PHP 5.5: 63.08 || - || 361.36 7.2-dev PHP 5.5: 65.42 || - || 426.56 /index.php?eID=eid_test_feuser 4.5.36-dev PHP 5.4: 45.05 || 74.01 || - 6.2.4 PHP 5.4: 30.28 || 37.88 || - 6.2.4 PHP 5.5: 44.34 || - || 191.62 6.2.11-dev PHP 5.5: 45.36 || - || 200.01 7.2-dev PHP 5.5: 46.36 || - || 216.01
For 7.2-dev I used in eid_test_feuser.php
<?php $feUserObj = TYPO3\CMS\Frontend\Utility\EidUtility::initFeUser(); // Initialize FE user object var_dump('eid_test_feuser!');
Whereas one might conclude: Performance is marginally better in TYPO3, update PHP to 5.5 and use php_opcache!
Until now I used the standard debian PHP packages but now I consider using dotdeb.org...
Updated by Alexander Opitz almost 10 years ago
Can you please add TYPO3 4.5 with PHP 5.5 for comparision?
Updated by Stephan Großberndt almost 10 years ago
Requests per second [#/sec] (mean) Version: No-Cache || APC || PHP 5.5 opcache /index.php?eID=eid_test 4.5.36-dev PHP 5.4: 81.87 || 95.25 || - 6.2.4 PHP 5.4: 42.51 || 49.87 || - 4.5.41-dev PHP 5.5: 88.06 || - || 175.04 6.2.4 PHP 5.5: 61.30 || - || 332.89 6.2.11-dev PHP 5.5: 63.08 || - || 361.36 7.2-dev PHP 5.5: 65.42 || - || 426.56 /index.php?eID=eid_test_feuser 4.5.36-dev PHP 5.4: 45.05 || 74.01 || - 6.2.4 PHP 5.4: 30.28 || 37.88 || - 4.5.41-dev PHP 5.5: 53.34 || - || 137.76 6.2.4 PHP 5.5: 44.34 || - || 191.62 6.2.11-dev PHP 5.5: 45.36 || - || 200.01 7.2-dev PHP 5.5: 46.36 || - || 216.01
Updated by Christian Kuhn almost 10 years ago
- Status changed from Needs Feedback to Resolved
Neat results :) I guess we can finally close this one then :)
Updated by Alexander Opitz almost 10 years ago
I'm a bit puzzled.
for PHP5.5 and /index.php?eID=eid_test
4.5 is 88:63 better then 6.2 without cache but with opcache 4.5 is 137:200 slower then 6.2? This means opcache fastens 6.2 so much better then 4.5? Really?
Updated by Stephan Großberndt almost 10 years ago
- Subject changed from Very bad eID-Performance in TYPO3 6.2 to Performance of eID-scripts in TYPO3 6.2
Those were my results. The test extension is in this ticket, scripts as well. Test it yourself :-)