Difference between revisions of "SUNScholar/Optimisations"

From Libopedia
Jump to navigation Jump to search
Line 43: Line 43:
  
 
==Monit monitor service==
 
==Monit monitor service==
In case the Tomcat service halts or hangs due to whatever... , I installed monit to restart the service and then alert me. See an example of my config below.
+
In case the Tomcat service halts or hangs due to whatever... , I installed monit to restart the service and then alert me. See an example of my config below, added to the bottom of the '''/etc/monit/monitrc''' file.
 
<pre>
 
<pre>
 
dspace@ir1:/etc/monit$ sudo cat /etc/monit/monitrc
 
dspace@ir1:/etc/monit$ sudo cat /etc/monit/monitrc
Line 49: Line 49:
 
set logfile syslog facility log_daemon
 
set logfile syslog facility log_daemon
 
set mailserver localhost
 
set mailserver localhost
set mail-format { from: XXXX@XX.XXX.XX.XX }
+
set mail-format { from: monit@ez.sun.ac.za }
set alert XXXX@localhost
+
set alert root@localhost
 
set httpd port 2812
 
set httpd port 2812
     allow %user%:%password%
+
     allow bibboek:Pheevin2
  
 
check process sshd with pidfile /var/run/sshd.pid
 
check process sshd with pidfile /var/run/sshd.pid
   start program  "/etc/init.d/ssh start"
+
   start = "/usr/sbin/service ssh start"
   stop program "/etc/init.d/ssh stop"
+
   stop  = "/usr/sbin/service ssh stop"
   if failed port 22 protocol ssh then restart
+
   if failed port 22 protocol ssh with timeout 5 seconds then restart
    
+
   alert hgibson@sun.ac.za
check host sunscholar with address scholar.sun.ac.za
+
 
   start program = "/etc/init.d/tomcat6 restart"
+
check process tomcat6 with pidfile /var/run/tomcat6.pid
   stop program = "/etc/init.d/tomcat6 stop"
+
   start = "/usr/sbin/service tomcat6 restart"
   if failed port 80 proto http then restart
+
   stop  = "/usr/sbin/service tomcat6 stop"
   alert XXXX@XXX.XX.XX
+
   if failed port 80 protocol http with timeout 300 seconds then restart
   alert XXXX@XXX.XX.XX
+
   alert hgibson@sun.ac.za
 +
   alert wklap@sun.ac.za
 
</pre>
 
</pre>
 
All confidential information has been replaced with % signs or captial X's.
 
All confidential information has been replaced with % signs or captial X's.

Revision as of 10:41, 19 February 2014

Back to After Installation Tasks

Introduction

This wiki page details the major optimisations of the system performed at Stellenbosch University in order to create a truly production optimised version of DSpace.

Java

Click on the heading above.

Tomcat

Click on the heading above.

Reduce system log sizes

Click on the heading above.

Email error logs

Click on the heading above

XMLUI

  • Use XMLUI exclusively to reduce the memory load.
http://wiki.lib.sun.ac.za/index.php/SUNScholar/Install_DSpace/S08

Database

  • Fix "browse index" configuration to reduce the PostgreSQL database server query load.
http://wiki.lib.sun.ac.za/index.php/SUNScholar/Indexes#Browse_Indexes

Vacumn the database regularly

http://wiki.lib.sun.ac.za/index.php/SUNScholar/Daily_Admin#.22postgres.22_crontab

Bitstream checker

Modified bitstream checker settings as follows to reduce database size.

#### Checksum Checker Settings ####
# Default dispatcher in case none specified
plugin.single.org.dspace.checker.BitstreamDispatcher=org.dspace.checker.SimpleDispatcher

# check history retention
checker.retention.default=1y
checker.retention.CHECKSUM_MATCH=2w
References

Monit monitor service

In case the Tomcat service halts or hangs due to whatever... , I installed monit to restart the service and then alert me. See an example of my config below, added to the bottom of the /etc/monit/monitrc file.

dspace@ir1:/etc/monit$ sudo cat /etc/monit/monitrc
set daemon  60
set logfile syslog facility log_daemon
set mailserver localhost
set mail-format { from: monit@ez.sun.ac.za }
set alert root@localhost
set httpd port 2812
     allow bibboek:Pheevin2

check process sshd with pidfile /var/run/sshd.pid
   start = "/usr/sbin/service ssh start"
   stop  = "/usr/sbin/service ssh stop"
   if failed port 22 protocol ssh with timeout 5 seconds then restart
   alert hgibson@sun.ac.za

check process tomcat6 with pidfile /var/run/tomcat6.pid
   start = "/usr/sbin/service tomcat6 restart"
   stop  = "/usr/sbin/service tomcat6 stop"
   if failed port 80 protocol http with timeout 300 seconds then restart
   alert hgibson@sun.ac.za
   alert wklap@sun.ac.za

All confidential information has been replaced with % signs or captial X's.

References