click here for details... Sakai Executive Director Position Search now open
Issue Details (XML | Word | Printable)

Key: SAK-4586
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Stephen Marquard
Reporter: Stephen Marquard
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Sakai

Slow performance viewing assignment list

Created: 11-May-2006 03:56   Updated: 23-Oct-2008 11:29
Component/s: Aliases (Admin Site Management), Assignments, Preferences
Affects Version/s: 2.1.x, 2.2.0, trunk [DO NOT USE]
Fix Version/s: 2.2.0

Time Tracking:
Not Specified

File Attachments: 1. GZip Archive mysqld-14jun06.log.gz (41 kB)
2. GZip Archive slow-assignments.log.gz (35 kB)

Environment: Linux, mysql, 2.1.x post 2.1.2 (r8934)
Issue Links:
Depend
 
Relate
 

2.6.x Status: None
2.5.x Status: None
2.4.x Status: None


 Description  « Hide
Students viewing the assignment list in a course experience extremely slow performance - upwards of 10 seconds to render the page. The course has approx 166 participants, and there are 12 assignments defined (of which 10 are currently open).

Analysis of the mysql logs (attached) for the period when the assignments list was rendered show:

- 3780 queries of the form:

select SAKAI_ALIAS.ALIAS_ID,SAKAI_ALIAS.TARGET,SAKAI_ALIAS.CREATEDBY,SAKAI_ALIAS.MODIFIEDBY,SAKAI_ALIAS.CREATEDON,SAKAI_ALIAS.MODIFIEDON from SAKAI_ALIAS where ( ALIAS_ID = NULL )

- 66 queries of the form:

select XML from SAKAI_PREFERENCES where ( PREFERENCES_ID = 'userid' )

- 38 queries of the form

select XML from ASSIGNMENT_ASSIGNMENT where ( ASSIGNMENT_ID = ? )

(even though there are only 12 assignments in this site)


 All   Comments   Work Log   Change History   Subversion Commits   git Commits      Sort Order: Ascending order - Click to sort in descending order
Zhen Qian added a comment - 25-May-2006 14:45
Stephen,

I couldn't find anyting in Assignment module which invokes SAKAI_ALIAS table. The table is consulted by several other implementations, like site email notification, Worksite Setup tool, etc.

Could you reproduce the problem and get the "select SAKAI_ALIAS.ALIAS_ID ..." in the tomcat now? My think is it was an accident...

Thanks,

- Zhen

Stephen Marquard added a comment - 25-May-2006 15:33
The performance problem is ongoing. Note that the logs are mysql query logs, not tomcat logs. What further info would be helpful to troubleshoot this?

Zhen Qian added a comment - 25-May-2006 16:42
Stephen,

I have turned on the log level to be "debug", with the following setting in sakai.properties.

log.config.count=1
log.config.1 = DEBUG.org.sakaiproject

The I will see all sql queries in my tomcat log, since the SqlService is logging at the debug level.

However, I am dealing with the most current 2.2 code now, and you reported based on 2.1.x.

- Zhen

Stephen Marquard added a comment - 26-May-2006 02:53
As our term is almost finished and we're upgrading to Sakai 2.2 when released, we will test this on 2.2 (when there's a migration script available).

If anyone else has this problem on 2.1.x, it might be worth pursuing, but we're more interested in whether the problem persists in 2.2 or not. We'll add more info when available.

Stephen Marquard added a comment - 14-Jun-2006 10:58
Repeated this on a trunk build (r10586) and am seeing identical symptoms - extremely large numbers of queries to the alias and preferences tables, leading to performance issues.

Stephen Marquard added a comment - 14-Jun-2006 11:03
mysql log from assignments list view run against 2.2 (our 2.1.x production db upgraded to 2.2 with the upgrade scripts). Sequence of events:

- Login as 'marquard'
- Search for POL3032F site in Worksite setup and navigate to the site
- Go to assignments tool to list the assignments (12 visible for this site)

Zhen Qian added a comment - 19-Jun-2006 10:27
Stephen,

I've put in fixes in r10868 and r10870. Please check whether those fixed your problems.

Thanks,

- Zhen

Zhen Qian added a comment - 19-Jun-2006 11:24
Close this ticket for now and track the issue in SAK-4586.

- Zhen

Stephen Marquard added a comment - 19-Jun-2006 13:50
The major problem (queries to SAKAI_ALIAS) has been resolved. However, I'm still seeing lots of queries to SAKAI_PREFERENCES like this:

select XML from SAKAI_PREFERENCES where ( PREFERENCES_ID = 'marquard' )

In the example I tested (logging just the queries generated after clicking on the tool reset icon), there were 127 of these - a large number of identical queries sequentially upfront, and then about 4 to 5 following each assignment query.

Stephen Marquard added a comment - 19-Jun-2006 13:53
Reopening this for the SAKAI_PREFERENCES issue (and downgrading priority, as the performance impact of this is lower). However, if you'd like to resolve this issue and open another one for the SAKAI_PREFERENCES behaviour, please go ahead.


Zhen Qian added a comment - 21-Jun-2006 12:59
Please refer to the progress of SAK-5288 for the remaining sakai_preferences query issue.

- Zhen

Stephen Marquard added a comment - 19-Jul-2006 05:28
Performance is now acceptable on our staging 2.2 server with our migrated 2.1.x production db.

To QA this on a QA server would require a realistic data set of a reasonable size (several hundred students in a course site with > 10 assignments listed, and existing assignment submissions).