Hello everyone,
I'm experiencing some performance issues with my testlink installation. As I've inherited the administration of the testlink from someone else in my company my knowledge is limited about testlink.
After getting complaints that testlink was becoming slow, I started searching for a cause.
I've found 2 causes:
1) testlink is writing access logs
2) everything that happens in the mysql database is kept in the "events" table and deleted after 30 days.
I've tried fixing these issues myself but was unable to.
In the "config.inc.php" I changed the log level from debug to error, but this doesn't changes that a line is written to logs/userlog0.log for every page requested by a user.
As I have no idea how the database works I didn't dive into it.
I requested help from the previous administrator, his solution to the log files was to create a cron job that deleted the log files every hour. His solution to the "events" table in the database was to set the retention policy to 1 day instead of 30 days.
This prevents that testlink stops working due to lack of diskspace.
Obvisously this isn't a very good solution to my problem.
Does anyone knows how I disable access logs being written?
Does anyone knows what I can do to prevent records (~100k/day) being written to the "events" table (and for what it's actually used)?
Server info:
Ubuntu 12.04 LTS
Testlink 1.9.5
mysql Ver 14.14 Distrib 5.5.37, for debian-linux-gnu (x86_64) using readline 6.2
PHP 5.3.10-1ubuntu3.11
Regards,
JanR
testlink performance issues
Moderators: Amaradana, TurboPT, TL Developers
Re: testlink performance issues
You could do a couple of things to help with the access log growth 'hassles', without the need to disable:JanR wrote: Does anyone knows how I disable access logs being written?
- Create a cron that simply truncates the file every day, week, or whatever may be needed.
- Setup logrotate on the file. Logrotate allows limiting the file size to "rotate" and/or how many backups get created for the file. [see this if you might not be familiar]. This can allow a 'history' of access files, but in a more manageable way.
Re: testlink performance issues
A cron job already exists to delete the logs every hour.
On a busy day it generates more than 1GB of log files per day, which creates a lot of unnecessary disk IO.
I really do not need to know who accessed which page at what time.
On a busy day it generates more than 1GB of log files per day, which creates a lot of unnecessary disk IO.
I really do not need to know who accessed which page at what time.
Re: testlink performance issues
OK, I'm going to check configi options in order to understand if log to file can be disabled while maintaing audit log to db
Re: testlink performance issues
>> Does anyone knows what I can do to prevent records (~100k/day) being written to the "events" table (and for what it's actually used)?
audit log
audit log
Re: testlink performance issues
Theorically since 1.9.4
/** @var map keys: 'all' + values present on proprety of logger class $loggerTypeDomain
* values can be only these defined on logger.class.php
* @since 1.9.4
* example array('all' => array('INFO','AUDIT'),
* 'mail' => array('ERROR'))
*/
$tlCfg->loggerFilter = null; // default defined on logger.class.php ;
Then if you put following line on your custom config
$tlCfg->loggerFilter = array('all' => array('NONE'));
you will suppress any kind of log on files and db
/** @var map keys: 'all' + values present on proprety of logger class $loggerTypeDomain
* values can be only these defined on logger.class.php
* @since 1.9.4
* example array('all' => array('INFO','AUDIT'),
* 'mail' => array('ERROR'))
*/
$tlCfg->loggerFilter = null; // default defined on logger.class.php ;
Then if you put following line on your custom config
$tlCfg->loggerFilter = array('all' => array('NONE'));
you will suppress any kind of log on files and db
Re: testlink performance issues
Thanks for the suggestions
I made the changes to the configuration files.
I'll let you know tomorrow if it helped.
I made the changes to the configuration files.
I'll let you know tomorrow if it helped.
Re: testlink performance issues
any news about config effects?