2

Is this value configurable by us, or this is limit by GCP?

chart limit

Other question is that write apparently are more than the limit after paralelizing from 1 to 10 threads more (only increase throughput by 2x, last few minutes from the chart above), what could be the possible cause of this?

3
  • Please indicate the specific database service (MySQL, PostgreSQL, or SQL Server) for your Cloud SQL. Please provide your configuration for parallelizing threads from 1 to 10 so that we could get a clearer picture. Commented Feb 8, 2024 at 18:47
  • Google Cloud persistent disks have performance limits that are directly related to disk size. That might be a factor, but your post has few details on what you configured. cloud.google.com/compute/docs/disks/… Based on your graph you are exceeding those limits. Commented Feb 8, 2024 at 22:23
  • @RobertG it is postgres 13, threads on the client side golang, just adding thread pool (the connection already connection pooled) pool = pond.New(10, 5000); for ... { pool.Submit( ... ) } ; pool.StopAndWait() using github.com/alitto/pond Commented Feb 9, 2024 at 5:02

1 Answer 1

6

I've managed to test whether read/write speed is configurable and I arrived with a conclusion that it is. You can change the read/write speed by changing the storage capacity.

Please check the images below:

This is a screenshot before changing the storage capacity:

And this is after changing the capacity:

I also noticed that if you're using HDD, write speed is higher than read speed:

You can only change storage capacity if an instance is already deployed. You can only select storage type when creating a new instance.

With regards write speed is over the limit, we can't make specific claims when changing thread value. There are several factors that this may cause:

  • Workload performance could impact read/write speed depending on the characteristics of the workload. Workloads which are heavily multi-threaded or take advantage of high levels of parallelism may experience performance improvements when hyper-threading is enabled. Single-threaded or those with limited parallelism may see little to no benefit.
  • Enabling hyper-threading increases the number of logical CPU cores only visible to the OS, which could result in increased context-switching overhead and potential resource contention or conflict over a shared resources between components, i.e., CPU, storage, RAM. This may have a slight impact on the performance of certain workloads.

It is recommended to monitor the performance metrics and conduct thorough testing before performing changes to the thread count in a Cloud SQL PostgreSQL instance.

Sign up to request clarification or add additional context in comments.

1 Comment

Robert, your answer is a good start for an article.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.