Project

General

Profile

Actions

Bug #54982

closed

Epic #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

Added by Rupert Germann about 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
Performance
Target version:
-
Start date:
2014-01-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

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

eid_test.zip (16.2 KB) eid_test.zip eID-Test-Extension with log files Stephan Großberndt, 2014-09-07 17:32
Actions #1

Updated by Rupert Germann about 10 years ago

  • Target version set to 6.2.0
Actions #2

Updated by Markus Klein about 10 years ago

  • Parent task set to #52949
Actions #3

Updated by Ingo Schmitt about 10 years ago

  • Category set to Performance
Actions #4

Updated by Alexander Opitz about 10 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. ;)

Actions #5

Updated by Oliver Hader almost 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...

Actions #6

Updated by Stephan Großberndt over 9 years ago

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!

Actions #7

Updated by Stephan Großberndt over 9 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
Actions #8

Updated by Alexander Opitz over 9 years ago

  • Status changed from Needs Feedback to Accepted
  • Assignee set to Alexander Opitz
  • Target version deleted (6.2.0)
Actions #9

Updated by Marcus Schwemer about 9 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

Actions #10

Updated by Wouter Wolters about 9 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.

Actions #11

Updated by Stephan Großberndt about 9 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...

Actions #12

Updated by Alexander Opitz about 9 years ago

Can you please add TYPO3 4.5 with PHP 5.5 for comparision?

Actions #13

Updated by Stephan Großberndt about 9 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
Actions #14

Updated by Christian Kuhn about 9 years ago

  • Status changed from Needs Feedback to Resolved

Neat results :) I guess we can finally close this one then :)

Actions #15

Updated by Alexander Opitz about 9 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?

Actions #16

Updated by Stephan Großberndt about 9 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 :-)

Actions #17

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF