Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tuning Sakai for Large Production Systems: Hints and Tricks Raúl Mengod Universidad Politécnica de Valencia (Spain)

Similar presentations


Presentation on theme: "Tuning Sakai for Large Production Systems: Hints and Tricks Raúl Mengod Universidad Politécnica de Valencia (Spain)"— Presentation transcript:

1 Tuning Sakai for Large Production Systems: Hints and Tricks Raúl Mengod Universidad Politécnica de Valencia (Spain)

2 2 Overview Introduction: Universidad Politécnica de Valencia (UPV) Sakai in the UPV Servers Infrastructure Database Numbers Statistics of our first academic year. Risk Analysis Tuning the Database 24/7 Tuning Tomcat Tuning the application

3 3 Valencia, a place to visit

4 4 CAMPUS DE VERA

5 5 Introduction Universidad Politécnica Valencia (UPV) –Public academic institution since 1971 –Official and non-official studies –Graduate and Post–Graduate studies The UPV in numbers –4 Campuses – 15 Colleges –40 Research centers – 40 Official Degrees –20 post graduate studies –40.000 Students – 2.600 Teachers –1.400 Staff

6 6 Sakai in the UPV Full production System in 2006/2007 –5 servers –Oracle Database v 9.2 –Integrated with SSO –Integrated with enrollment system –4.000 sites per year –40.000 students Based on the 2.1.2 version –Customized to university requirements –A split branch from sakai 2.1.x maintenance branch –Many changes to the code, i18n, etc… –Almost impossible to merge patches/fixes

7 7 Sakai in the UPV

8 8 Server Infrastructure

9 9 Database Server –ULTRA SPARK RISK 1.4 GHz –16Gb RAM –Solaris v.10 Application Server –Xeon Multi-thread 3.4 GHz –4Gb RAM –Linux-Red Hat 3.0 Hw Balancer –CISCO CSS 11000

10 10 Database Numbers Sakai –# sites……………………………: 9.455 –# students……………………….: 34.083 –# enrollments…………………...: 352.655 Resources –# resources items…………….…: 111.929 –# resources folders……….….….: 493.233 Melete –# sites using melete…..………..: 839 –# melete modules …….………..: 8.450 –# melete sections……………….: 15.756 Samigo –# sites using samigo…………....: 461 –# assessments………...………..: 1.458 –# question pools………..……….: 2.699 Other Tools –# assignments………………….: 1.740 –# announcements………………: 5.896

11 11 Evolution Sept 2006 - May 2007

12 12 Evolution Sept 2006 - May 2007

13 13 Evolution Sept 2006 - May 2007

14 14 Performance Problems Database Deadlocks Samigo-Gradebook integration High response time in Resources Tool High response time handling question pools Unacceptable response time in DropBox Tool Slow performance in Assignments Lists Unnecessary Database accesses of ResourceLoader General performance slow down with Site Stats Tool

15 15 Performance Risk Analyze What is the main risk for performance? –Developers Worried about ‘what to do it’ and not ‘How to do it’ Problems are generated with the design of the application –Test environments Developing environments are not good for performance testing QA is done on empty databases –Unknown future Unknown number of concurrent users

16 16 Tuning Sakai Database –http://confluence.sakaiproject.org/confluence/display/DOC/Sakai+2.4+Admin+G uide+-+Database+Configuration+and+Tuninghttp://confluence.sakaiproject.org/confluence/display/DOC/Sakai+2.4+Admin+G uide+-+Database+Configuration+and+Tuning Sakai.properties –validationQuery@javax.sql.BaseDataSource= –defaultTransactionIsolationString@javax.sql.BaseDataSource= – testOnBorrow@javax.sql.BaseDataSource =false SAM_MEDIA_T.MEDIA BLOB in Oracle Enable caching queries on MySql Disk I/O issues with Linux –Heavy queries monitoring –Deadlock monitor Sakai 2.1.2 integration problems with samigo-gradebook –Folllow the advices of your database provider –Trust your Database experts. Sakai is just another application

17 17 Indexes are our friends Access to table without an index is a possible future problem. –Developers sometimes are unaware of that problem –The problems doesn’t come suddenly Access to child table –Sometimes the PK is not used for all accesses –All access to an AK in a table should have an index

18 18 Logging SAKAI_SESSION and SAKAI_EVENT –Growing all the time –Never are deleted by Sakai –No indexes –Slows down some processes Our Database –SAKAI_SESSION….. 1.967.240 records –SAKAI_EVENTS……. 19.440.705 records –Remove records to a Backup Table –Nightly process

19 19 Tuning Sakai Database SqlLAB –Test Database –Identify heavy queries (by time, by block) –Identify repeated queries –Is not free (Quest Software) Examples –Missing Indexes in SAMIGO –Multiple accesses to SAKAI_PREFERENCES Table from ResourceLoader –Child record recovered when not is necessary

20 20 Performance means 24 / 7 EMC Systems –Non stop for 24 hours (1 minute) –Make backup from Snapshots –Data files copy and Database Export

21 21 Tuning Sakai Servers Tuning –Have a good balancer IP balancing is simple but worked fine –http://confluence.sakaiproject.org/confluence/display/DOC/Sakai+2.4+ Admin+Guide+-+JVM+Tuninghttp://confluence.sakaiproject.org/confluence/display/DOC/Sakai+2.4+ Admin+Guide+-+JVM+Tuning JAVA_OPTS Tuning the Garbage Collector (Sun) Java Tuning White Paper –UPV JAVA OPTS Maximum Heap 2Gb (Linux supports a maximum of 2.1 Gb) Minimum Heap 2Gb Perm Space 512 Mb No Out of Memory Working fine with 400-500 users Stressed up to 700 users

22 22 Tuning Sakai Application/Sakai Tuning –Hibernate can help you or kill you Careful use of sets and subclasses Use of deferred queries when possible Be aware of what hibernate is doing –Tomcat logging Check the logging status INFO or WARN Working fine with INFO

23 23 Performance Testing Jmeter –Apache Foundation project –Sakai test suites available on reference directory Positive –Tests the whole system –Test max number of sessions working –Identifying bottlenecks Negative –Difficult to generate a real TestSuite –Not good for integration testing

24 24 Conclusions Follow the advices in the admin docs Try to anticipate to the performance Problems Have always ready an spare server Monitor systems Don’t trust anyone and Test, Test and Test.

25 Thank You rmengod@upv.es


Download ppt "Tuning Sakai for Large Production Systems: Hints and Tricks Raúl Mengod Universidad Politécnica de Valencia (Spain)"

Similar presentations


Ads by Google