Tuesday, December 19, 2017

Re: [google-cloud-sql-discuss] Re: CloudSQL size

Also to clarify; I'm not even sure there is a problem. As part of monitoring the instance there are a number of logs that are generated that will consume some disk space even if you do not use your instance. Since this is a new instance (it looks like from the screen shot), the disk usage would increase for the first week and then stabilize as logs are rotated.
/E

On Tuesday, December 19, 2017 at 9:22:48 AM UTC-8, Emil Gustafsson wrote:
I believe that your problem might be different but I would need some more information to be sure. And the drop in storage usage is most likely (as you suspect) because logs got rotated. I'll contact you separately to get the additional data.
/E

On Monday, December 18, 2017 at 7:22:13 AM UTC-8, Mpp Loop wrote:
Emil,

I'm having a similar issue where I have a brand new CloudSQL database instance with 150GB SSD storage + failover replica. Spun it up about 2 weeks ago and have been delayed on working on it after some initial testing. But there has been no active applications writing to the database so it's effectively empty.

Yet the current storage usage is 1.382 GB. Auto storage increase is enabled, as is the "highly available" configuration. One thing I did notice is the storage was higher than that but dropped back down. Would this be logs turnover in action? Am I likely experiencing a similar issue to Giuliano?

If you (or anyone) could point me in the right direction I'd truly appreciate it. Want to make sure my settings aren't going to unnecessarily have my storage explode over time during actual usage.

Thank you,

-Mike







On Thursday, September 7, 2017 at 5:18:10 PM UTC-4, Emil Gustafsson wrote:
I've helped Giuliano separately in a private thread. The trigger was enabling the general query log and when that setting was later turned off the log collector picked up on this change and stopped monitoring the file also causing log rotation stop. Meanwhile the database did not pick up on this change until restarted and meanwhile filled the log file ultimately causing a lot of extra disk space being used. We are working on fixing this.
/E

On Wednesday, September 6, 2017 at 12:05:18 PM UTC-7, Shivam(Google Cloud Support) wrote:
This could be related to innodb_file_per_table flag set to off. InnoDB never shrinks its default tablespace. Based on this doc, the only way is to create a new instance from the smaller database, or change the value of the innodb_file_per_table flag to ON. For information about changing Cloud SQL flags, see Configuring Cloud SQL Flags.


On Tuesday, September 5, 2017 at 2:57:44 PM UTC-4, Giuliano Ribeiro wrote:
Yes, for sure.
I'm talking about Storage Usage:


And here you can see the estimate size of my 2 schemas:


It is so weird, because is just a few tables, and today in the morning I have turned off the backups(and deleted the old ones), restarted the DB and nothing happens about the size. 
As you can see in the graph I had only a few gigas down, because I truncate a temporary table with 4gb of size.

Thank you,



On Tuesday, September 5, 2017 at 7:45:43 PM UTC+1, Vadim Berezniker wrote:
Can you post a screenshot of which property of the instance you are referring to? 
Are you referring to the data size as shown by the storage chart or the instance disk size?
The first should reflect the size of the actual data on disk whereas the second could be larger since it is the maximum capacity.

One common source of unexpected disk growth is from MySQL temporary tables, though if this is the case the actual storage should go down after the query is done (though the total disk will not go down since it can only grow).

On Tue, Sep 5, 2017 at 11:38 AM, Giuliano Ribeiro <giuliano...@ilegra.com> wrote:
I've been doing this manually, as the DB is gain size it's stopping to work, so I need to increase the size manually.


On Tuesday, September 5, 2017 at 6:35:12 PM UTC+1, Giuliano Ribeiro wrote:
No, the "Automatic storage increase" is not enable.

On Tuesday, September 5, 2017 at 6:30:18 PM UTC+1, Shivam(Google Cloud Support) wrote:

So "Automatic storage increase" was enabled? As discussed, size of Cloud SQL 2nd gen instance cannot be decreased. Even if you are cleaning up your DB everyday, size increased once cannot be decreased.



On Tuesday, September 5, 2017 at 8:02:15 AM UTC-4, Giuliano Ribeiro wrote:
Hi Shivam, I even delete all my backup and turned off this feature.
The DB right now have 31mb in one schema and 890mb in another, but CloudSQL dashboard is showing me up 146GB.
Do you have any idea about it?

Thank you,


On Monday, September 4, 2017 at 6:26:43 PM UTC+1, Shivam(Google Cloud Support) wrote:

Do you have 'Automatic storage increase' option enable for your Cloud SQL instance? This setting calculates a threshold based on the current instance size and adds additional storage capacity automatically to the instance. This makes sure that your instance continues to serve as your database is growing.


Do you know if your database size ever reached a value closer to 146 GB? In this case, Automatic storage increase' option has added this additional capacity to the instance. There is currently a feature request in place to allow decreasing the size of Cloud SQL 2nd gen instance as it cannot be decreased currently. I recommend to star the feature request to receive any future updates.


On Monday, September 4, 2017 at 8:06:11 AM UTC-4, Giuliano Ribeiro wrote:
Hello all, 
I have a database on the 2nd gen which is only a temporary db, I continuously receive data, process them with procedures and then clean up all data. 
In the end of the day, my DB have no more then 30Mb.
But the weird is the DB grown up in size, right now it is 146Gb, but if I do a export or get the table sizes, it takes only 30mb.
I tried to delete the backups and restart the DB, but no size reduce. The binary option is disabled as well.
Do you know how CloudSQL count the DB size?

Thank you.,

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/404205dc-f4d6-4336-81f3-5a3567d0a3af%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/edd7aa69-4703-4078-972d-967a1a6b1db4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment