AWS RDS 无服务器扩展是否有助于当前运行的查询?

huangapple go评论130阅读模式
英文:

does aws rds serverless scaling help current running query?

问题

我有一个AWS Aurora无服务器RDS。偶尔会运行涉及大量记录连接和/或更新的查询。

当一个资源密集型的查询启动时,无服务器环境会扩展...当前正在运行的查询是否实际上可以利用新的资源,还是仅限于未来的查询?

我现在正在测试这个(如果我可以的话)...我运行了这个大查询,但在30分钟后它仍然没有返回...(过去我曾看到这个查询在5分钟内返回)。我不确定如何判断发生了什么样的“扩展”...但假设在运行此查询时已经发生了扩展...我终止了查询,然后重新运行了该过程。不幸的是,这是一个多步骤的过程...所以现在我正在等待看它是否运行得更快。

所以我想这是一个由两部分组成的问题:
有没有一种简单的方法来查看当前的扩展“级别”?例如,看到它已经提高,然后稍后看到它降低回来...

当扩展增加时,如果一个查询正在运行,那么该查询实际上是否能够利用扩展,还是只有未来的查询?

谢谢

英文:

I have an aws aurora severless rds. Once in awhile, i have queries run which involve a large number of records being joined and/or updated.

When a resource intensive query kicks off, and the serverless environment scales up.. does the query that is currently running actually get to make use of the new resources, or is it only for future queries?

I am testing this out right now (if i can).. I ran the large query and it wasn't returning after 30 minutes.. (i have seen this query return in 5 minutes in the past). I'm not sure how to tell what 'scaling' has occurred.. but assuming it has scaled up while this query has been running.. I killed the query, and then just ran the process again. Unfortunately this is a many-part process.. so I'm now waiting to see if it runs any faster.

So I guess its a 2 part question:
is there a simple way to see the current scaling 'level'? eg. see that it has raised, and then later, see it lower itself back down..

when the scaling increases, and a query is currently running.. will that query actually get to take advantage of the scaling, or only future queries?

Thanks

答案1

得分: 1

这不会帮助当前正在运行的查询,因为为了进行扩展,Aurora必须找到一个扩展点。这被定义为没有活动事务/查询的时期。如果在超时之前找不到扩展点,将根据配置的TimeoutAction(https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ScalingConfiguration.html)要么放弃扩展,要么强制扩展。强制扩展会终止任何打开的连接。因此,您正在运行的查询将阻止扩展,直到完成。

您可以在Amazon RDS控制台中查看集群的当前容量。https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.viewing.html

英文:

It will not help currently running queries, because in order to scale, Aurora has to find a scaling point. This is defined as a period with no active transactions/queries. If a scaling point cannot be found before the timeout is reached, scaling would either be abandoned or forced, depending on the configured TimeoutAction (https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ScalingConfiguration.html). Forced scaling would kill any open connections. Your running query would therefore block scaling until it completes.

You can see the current capacity of your cluster in the Amazon RDS console. https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.viewing.html

答案2

得分: 0

你可能会在这种情况下更幸运,如果你运行的是足够新的版本以使用Aurora Serverless v2:

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html

与缩放点有关的情况,其中缩放仅对未来的查询有帮助,仅适用于Serverless v1。

您可以从AWS控制台查看集群的当前容量设置,无论是Serverless v1还是v2。但为了简单起见,我通常只显示缓冲池的当前大小(MySQL)或共享缓冲区(PostgreSQL)的当前大小。这可以从任何客户会话中完成。Serverless v1始终按内存大小加倍或减半; Serverless v2按0.5 ACU(对应1 GB RAM)的增量进行缩放。

英文:

You can probably have better luck in this scenario if you are running a recent enough version to use Aurora Serverless v2:

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html

The business with scaling points, where scaling only helps future queries, applies only to Serverless v1.

There are settings you can look at from the AWS Console to show the current capacity settings for a cluster, either Serverless v1 or v2. But for simplicity what I normally do is just show the current size of the buffer pool (MySQL) or shared buffers (PostgreSQL). That can be done from any client session. Serverless v1 scales always by doubling or halving the memory size; Serverless v2 scales up and down in increments as small as 0.5 ACUs (corresponding to 1 GB of RAM).

huangapple
  • 本文由 发表于 2023年7月11日 00:26:07
  • 转载请务必保留本文链接:https://go.coder-hub.com/76655646.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定