Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inefficient session "data" handling via "dbtable" session save handler #8308

Open
SR-mkuhn opened this issue Jul 9, 2015 · 4 comments
Open
Labels
c: Performance For when we could improve the performance / speed of Matomo. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.

Comments

@SR-mkuhn
Copy link

SR-mkuhn commented Jul 9, 2015

If a value of the session is updated, the data field of piwik_session gets fully rewritten (it's a text blob) instead of simply updating the one value.

This text blob is already a data structure - but not a data structure mysql understands. This breaks mysql database replication binlog, because this change is logged there (to apply it to an other server) and causes higher database traffic as needed.

@mattab
Copy link
Member

mattab commented Jul 15, 2015

Hi @SR-mkuhn

do you find this issue is really bad, or just a little "nice to have", in other words, did you notice a real database traffic increase due to this issue?

@mattab mattab added the Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. label Jul 15, 2015
@mattab mattab added this to the Mid term milestone Jul 15, 2015
@mattab mattab added the c: Performance For when we could improve the performance / speed of Matomo. label Jul 15, 2015
@SR-mkuhn
Copy link
Author

It is really bad, because there are cases, like #8307, where 16KB(and rising) are written multiple times in a second.

@mattab
Copy link
Member

mattab commented Jul 16, 2015

@SR-mkuhn we will fix #8307 with high priority, which hopefully makes this "inefficient session handler" less important bug. once #8307 will be fixed, if you still find this issue creates slowness in the db replication, please let me us know

@SR-mkuhn
Copy link
Author

I understand the convenience to store data this way, because it is similar to a filebased sessionstore. ;-)
Until somebody finds a way to put arbitrary large data in this field. I think #8307 is just one known way to trigger this bug. And as the replication binlog just saves differences, a rewrite causes more traffic even if a change is minimal inside this field-datastructure.

@mattab mattab modified the milestones: Long term, Mid term Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Performance For when we could improve the performance / speed of Matomo. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

2 participants