Is APCu supported?

Plus d'informations
il y a 1 mois 1 semaine #159438 par zfocuz
zfocuz a créé le sujet : Is APCu supported?
The Yii framework has a APC(u) cache implementation which is included in LimeSurvey. I could however find no information on using this caching machanic in combination with LimeSurvey.

I've tried to activate it on my development server by changing line 146 in

/application/config/internal.php

to
'class' => defined('YII_DEBUG') && YII_DEBUG ? 'system.caching.CDummyCache' : 'CApcCache',

I also changed line 32 in

/framework/caching/CApcCache.php

to
public $useApcu=true;
to use the apcu caching extension.

After testing I've found some significant changes in LimeSurvey's performance both bad and good. The following things changed:
  • The pagination on /admin/survey/sa/listsurveys is much faster. Loading a next page used to took a few seconds now it's almost instant
  • Loading any admin page will take longer but revisiting these pages is much faster
  • Visiting and navigating a survey (frontend) is so much faster its unbelievable!
  • Visiting a survey through the admin pages (backend) takes longer and seems to not use caching at all(?)

I've used APCu INFO to test the usage of APCu and it seems to be working for most of the pages. Some admin pages (like the viewing of a survey) only generate misses and are actualy slower but overall performance is increased. Some admin pages also seem to clear the memory (maybe by overloading?) but I've not been able to prove this.

I was wondering why there is no official documentation on caching and why there are no caching settings in LimeSurvey? LimeSurvey is resource hungry and spends a lot of time doing I/O, so caching using memory should be a welcome feature. Is this an officialy supported caching mechanic or are there some significant downsides I've not yet discovered?

Connexion pour participer à la conversation.

Plus d'informations
il y a 1 mois 1 semaine #159463 par DenisChenu
DenisChenu a répondu au sujet : Is APCu supported?
Because you can use any Yii caching you want. But we use more for DB Caching issue.

Else : NEVER update an included file : you can do in your config.php file (if it's broke : report the bug).
manual.limesurvey.org/Optional_settings#Yii_settings

And we always happy to have more help for update our manual: please help us …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Les utilisateur(s) suivant ont remercié: LouisGac

Connexion pour participer à la conversation.

Plus d'informations
il y a 1 mois 1 semaine - il y a 1 mois 1 semaine #159472 par zfocuz
zfocuz a répondu au sujet : Is APCu supported?
I have put these settings into the global config file: (You are right I should not touch core files)
return array(
	'components' => array(
		'db' => array(),
        'cache'=>array(
           'class' => 'CApcCache',
           'useApcu' => true
        ),
	)
)
This seems to be working.

But as I understand from your comment LimeSurvey still uses some other caching mechanics (like file caching inside the /tmp folder)?

Is it safe to use APCu or other Yii caching mechanics to speed up certain parts of LimeSurvey? I've done some tests and everything seems to work fine.

Also do you have any clue as to why switching to APCu caching seems to decrease loading time for survey pages in the backend (e.g. /admin/survey/sa/view/surveyid/123456)? Are these pages cached? or is there some check that takes a long time?

I think this is important information as caching could significantly increase LimeSurvey's speed and stability in certain situations. I might write something for the documentation when I find out exactly how this works.
Dernière édition: il y a 1 mois 1 semaine par zfocuz.

Connexion pour participer à la conversation.

Plus d'informations
il y a 1 mois 1 semaine #159473 par zfocuz
zfocuz a répondu au sujet : Is APCu supported?
Quick addition.

Visiting an survey page in the backend (e.g. /admin/survey/sa/view/surveyid/123456) directly by typing the url into the browsers address bar is much faster than accessing it trough the overview page (/admin/survey/sa/listsurveys). I'm not sure if this has anything to do with caching or if this might be related to a bug. Can someone tell me if there is a difference in the processing of the page depending on how you access it? or can someone direct me into the direction of the script involved?

Connexion pour participer à la conversation.

Plus d'informations
il y a 1 mois 1 semaine #159474 par DenisChenu
DenisChenu a répondu au sujet : Is APCu supported?
About LS and caching, not really. We have some project to use caching for survey generation (Expression Manager take a lot of time and need caching).
But in Yii : you need to ask to use cache. And if i remind : we use it only for DB Caching actually.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Connexion pour participer à la conversation.

Plus d'informations
il y a 1 mois 1 semaine #159475 par zfocuz
zfocuz a répondu au sujet : Is APCu supported?

DenisChenu écrit: About LS and caching, not really.

Not really sure what you are pointing at? Regarding if it is safe to use APCu caching and LimeSurvey or if you have any clue as to why APCu caching might speed up certain parts of the admin pages but not the admin survey page?

DenisChenu écrit: We have some project to use caching for survey generation (Expression Manager take a lot of time and need caching).

Is this what the /tmp folder is all about? These are pre-generated survey templates right?

DenisChenu écrit: But in Yii : you need to ask to use cache. And if i remind : we use it only for DB Caching actually.

Is there a global setting that dictates what kind of caching we do? Atm my LimeSurvey is using huge amounts of I/O time and caching to APCu instead of the database might be usefull if at all possible.

Connexion pour participer à la conversation.

Plus d'informations
il y a 1 mois 1 semaine #159478 par DenisChenu
DenisChenu a répondu au sujet : Is APCu supported?

zfocuz écrit:

DenisChenu écrit: About LS and caching, not really.

Not really sure what you are pointing at? Regarding if it is safe to use APCu caching and LimeSurvey or if you have any clue as to why APCu caching might speed up certain parts of the admin pages but not the admin survey page?

It's safe to use any of cache system you want, but cache are not used a lot in LimeSurvey.

zfocuz écrit:

DenisChenu écrit: We have some project to use caching for survey generation (Expression Manager take a lot of time and need caching).

Is this what the /tmp folder is all about? These are pre-generated survey templates right?

pre-generated survey templates is another system , and tmp folder is just here for old system compatibility. It's not really caching.

zfocuz écrit:

DenisChenu écrit: But in Yii : you need to ask to use cache. And if i remind : we use it only for DB Caching actually.

Is there a global setting that dictates what kind of caching we do? Atm my LimeSurvey is using huge amounts of I/O time and caching to APCu instead of the database might be usefull if at all possible.

No, except the one you already update.


In fact there are some part where i think we must use cache : inside github.com/LimeSurvey/LimeSurvey/blob/9b...mon_helper.php#L1780 for example. We DO each times a big part for a lot of user, we must improve this by doing some part in cache. But here need dev

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Les utilisateur(s) suivant ont remercié: LouisGac

Connexion pour participer à la conversation.

Plus d'informations
il y a 1 mois 1 semaine #159497 par zfocuz
zfocuz a répondu au sujet : Is APCu supported?
Thanks for elaborating.

I see some performance improvements but the amount of data cached is really small indeed.

It would indeed be nice to have caching on some of these heavy scripts that slow LimeSurvey down. It would make it easier to host LimeSurvey on shared hosting platforms without running into problems (mainly I/O and CPU) with big surveys.

I guess this is on the feature request list already, not sure if it has any priority.

Connexion pour participer à la conversation.

Plus d'informations
il y a 1 mois 6 jours #159556 par DenisChenu
DenisChenu a répondu au sujet : Is APCu supported?
There are some feature for cache some part … but we always happy to have new idea …
Or better : new pull request ;)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Connexion pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!