Project

General

Profile

Actions

Task #54990

closed

Epic #55070: Workpackages

Epic #55065: WP: Overall System Performance (Backend and Frontend)

Story #55073: review autoloader and language cache

ClassLoader cache ist too slow, no matter which CF Backend is used

Added by Rupert Germann almost 11 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
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:
Sprint Focus:

Description

while Profiling a 6.2 installation with XHProf I found that the most expensive part of the request is always the classloader cache - no matter which CF backend is used for it.

the attached callgraphs both show the delivery of a cached page, one with the default configuration (simple file backend) and one with the classloader cache Backend set to memcached.

In both cases we see that either file_get_contents() or Memcach::get() is the most expensive function.

the request times (mesured with the adminPanel) are almost the same in both cases: ~155ms with simple file backend and 150 ms with memcache

Since memcache should be way faster than the filesystem I think there's a lot of room for optimizing in the classloader.


Files

callgraph_filesystem.png (2.83 MB) callgraph_filesystem.png Rupert Germann, 2014-01-14 16:54
callgraph_memcached.png (2.23 MB) callgraph_memcached.png Rupert Germann, 2014-01-14 16:54

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #55029: Class Loader fails if entry in class cache is discardedClosed2014-01-15

Actions
Actions #1

Updated by Markus Klein almost 11 years ago

  • Parent task set to #52949
Actions #2

Updated by Helmut Hummel almost 11 years ago

Hi Rupi,

Rupert Germann wrote:

Since memcache should be way faster than the filesystem I think there's a lot of room for optimizing in the classloader.

I'm looking at the graph and the code and really asking myself where the room is for optimizing. Given the cache is populated, the code is pretty straightforward and only does 3 things:

  1. lookup the cache entry
  2. get the cache entry
  3. require the class file

Can you elaborate how this could be optimized?

Actions #3

Updated by Helmut Hummel almost 11 years ago

Rupert Germann wrote:

In both cases we see that either file_get_contents() or Memcach::get() is the most expensive function.

The memcache backend is also not optimal here. Can you check the performance with an APC backend?

Actions #4

Updated by Helmut Hummel almost 11 years ago

Numbers from my Server for incl wall time of loadClass

  1. SimpleFileBackend: 61,557
  2. ApcBackend: 23,505

APC is roughly 3 times faster

Actions #5

Updated by Helmut Hummel almost 11 years ago

  • Status changed from New to Needs Feedback
Actions #6

Updated by Helmut Hummel almost 11 years ago

  • Status changed from Needs Feedback to New
Actions #7

Updated by Ingo Schmitt almost 11 years ago

  • Parent task changed from #52949 to #55073
Actions #8

Updated by Ingo Schmitt almost 11 years ago

  • Category set to Performance
Actions #9

Updated by Rupert Germann almost 11 years ago

Yes, indeed APC is way faster here.
But the point is: I don't want to use accelerators just to make a site usable.
In case I really need an accelerator because my site has a huge load than I'm already out of options.

Actions #10

Updated by Mathias Schreiber almost 10 years ago

  • Status changed from New to Resolved

composer classloader solves this

Actions #11

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF