Bug #95855 Big disk write
Submitted: 18 Jun 2019 7:13 Modified: 20 Jun 2022 9:42
Reporter: Sergey longman Email Updates:
Status: Verified Impact on me:
Category:MySQL Workbench Severity:S5 (Performance)
Version:8.0.16 OS:Ubuntu (18.10)
Assigned to: CPU Architecture:x86
Tags: disk, SSD, write

[18 Jun 2019 7:13] Sergey longman
- I noticed that Workbench constantly writes (1 time per 9 seconds) something to SSD with different speed dependently to databases, to which it connected. 
- my desktop works 24*7, so Workbench (without ANY activity) wastes SSD lifetime

1. when i don't connect to any database it doesn't write almost completely 
2. when i connect only to local database it writes about ~600KB/min.
3. when i connect to remote Amazon RDS database and don't execute ANY SQL statements (so Workbench is simply opened on background without ANY activity) - then i see writes to disk with speed ~2.3MB/min. 
4. when i connect to local database AND Amazon RDS - ~2.7MB/min. so in 24 hours: 3.8 GB, in 1 month: 118 GB, in 1 year: 1.4TB. i think it is a lot for application without my (as user) activity.

i think such behavior is very strange, WHY and WHAT it should to write to the Disk when application don't used?

screencast: https://youtu.be/HI2663Z_dSU

i can give you additional info if you need

How to repeat:
1. run MySQL Workbench
2. connect to remote database
3. wait

Suggested fix:
1. review what is the purpose of current writing to the disk, when Workbench remains in state without ANY activity?
2. dramatically decrease such writing, because it degrades SSD lifetime
[18 Jun 2019 7:30] Sergey longman
it seems the reason of writes is AUTOSAVE.

i used strace utility (strace -e trace=write -p 9140 -s 80) and it catches writes each 10 seconds of the same data. 

for preventing of constant autosaving THE SAME data i think you should have some flag on opened tabs, which will says that tab was edited and needs to be autosaved on the next 10 seconds period.

what do you think as core developers?
[21 Jun 2019 13:33] MySQL Verification Team
Hello Sergey,

Thank you for the report and feedback.
Agree, it should attempt to auto save only those which are modified since last auto save. Workaround for now seems to be increase Auto-save scripts interval.

[21 Jun 2019 13:46] Mike Lischke
You can disable auto save in the "Preferences -> SQL Editor -> Auto-save scripts interval" as an intermediate measure. I agree that auto save should only happen when something in the editors changed.
[10 Jul 2020 19:18] Teodor Atroshenko
This also happens on Windows 10. Having some 8 to 10 tabs open with a few dozen long statements in each with two or three different server connections easily translates into a terabyte of Disk I/O yearly, and with no warning - I've started investigating after I've noticed regular spike pattern in the Task Manager.
[20 Jun 2022 9:42] Sergey longman
Hello, 3 years ago i made this issue, but don't see any information about resolve..

maybe it is time to answer?