|
Andrzej Wójcik (Tigase) opened 4 months ago
|
||||
|
Andrzej Wójcik (Tigase) changed state to 'In Progress' 4 months ago
|
||||
|
Andrzej Wójcik (Tigase) added "Related" tigase-private/systems-maintenance/servers#384 4 months ago
|
||||
|
I've reviewed stored procedures and their SQL queries and I've found a suboptimal usage of indexes in one of the cases. I've modified source code of the stored procedures and committed them in a separate branch named |
||||
Referenced from commit 4 months ago
|
|||||
Referenced from commit 4 months ago
|
|||||
Referenced from commit 4 months ago
|
|||||
Referenced from commit 4 months ago
|
|||||
Referenced from commit 4 months ago
|
|||||
Referenced from commit 4 months ago
|
|||||
|
Andrzej Wójcik (Tigase) changed state to 'In QA' 3 months ago
|
||||
|
Just got a notification from tigase.im:
|
||||
|
This could still be caused by total number of queries being run on the database. Current version running at tigase.im does not contain a fix for tigase/_server/tigase-push#65, so it is running "statistics" query every second from each cluster node. That with increased usage of tigase.im (usage peak) could cause this query to be slow (or timeout). At this point I do not see anything more what we could do to improve the situation with optimization of SQL queries. |
||||
|
Should we update the installation just to make sure we are running latest version with all the fixes? |
||||
|
I think that we should update the installation anyway, as it is running older snapshot build. I've applied fixed that were in SQL stored procedures but any changes in the app code were not applied. |
||||
|
Wojciech Kapcia (Tigase) added "Related" tigase-private/systems-maintenance/servers#447 2 months ago
|
||||
|
tigase.im updated, let's see how it behaves now. |
||||
|
Again timeout:
|
||||
|
In this case, I have no idea what we can do next. We have optimized current schema so it would be as performant as possible and use correct indexes. The query that is now causing the issue is most likely related to fetching data/messages from the database based on offset, so it shouldn't be that problematic for MySQL unless it is required to fetch quite a lot of messages. The only other solution that I see right now, would be a change of database schema to denormalize it and change primary keys to reduce indexes sizes, increase performance and maybe that would allow us to sort messages by "ids" instead of timestamps improving query performance as well. But that would be a bigger job and most likely for a "big" release. |
||||
|
Wojciech Kapcia (Tigase) referenced from other issue 2 months ago
|
||||
|
Wojciech Kapcia (Tigase) added "Related" #85 2 months ago
|
||||
|
Let's close it for now as it seems to be working well enough. I've created #tigase/_server/tigase-message-archiving#85 as a follwup. |
Type |
Task
|
Priority |
Normal
|
Assignee | |
Version |
none
|
Sprints |
n/a
|
Customer |
n/a
|
-
tigase-server-8.5.0 Open
Fetching messages still causes timeouts on our installation when a lot of data to be retrieved. It would be good to review their performance and usage of indexes.