暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Oracle查询CPU利用率

askTom 2018-04-06
351

问题描述

我正在查看实例大小,并对Oracle如何使用CPU内核有一些疑问。假设这是一个标准版数据库,因此没有查询将以并行模式运行。假设系统后台过程可以忽略不计:

*) 当单个查询在Oracle Standard Edition中运行时,如果我在系统上没有其他用户并且没有其他查询在运行 (除了后台进程),则该查询是否在单个CPU内核上运行?因此,说20个内核对拥有1个内核没有任何影响,而不管一个查询给系统带来了多少负载?

*) 多个内核是否仅在您同时运行多个进程时才起作用?

*) 如果我有一个通宵的批处理过程,这是相当资源密集型,但运行的查询串联,一步又一步,然后非常轻的用户事务工作负载在一天,它是明智的大小的CPU计数为每日使用给定的批处理进程一次运行一个,在正常的用户活动之外?

*) 我相信我们可以为Oracle指定最大数量的CPU内核。假设我有一个运行2个Oracle实例的16核心服务器,并且我将每个实例限制为8个内核-Oracle将如何使用这些内核?两者都尝试仅使用前8个,而其余8个将未使用吗?还是会使用所有16个,但最多只能同时使用8个,并让操作系统选择要对工作线程进行复用的操作?


我知道大小比CPU内核要多得多,但是我想首先澄清以上几点。

专家解答

*) When a single query runs in Oracle Standard Edition, does that one query run on a single CPU core if I have no other users on the system and no other queries running (background processes aside)? So having say 20 cores would make no difference to having 1 core, regardless of how much load that one query put on the system?

正确。单个 (非并行) 查询在其执行期间只能使用单个核心。

*) Do multiple cores only come into play when you have multiple processes running concurrently?


是的。

*) If I have an overnight batch process that is quite resource intensive but runs queries in series, one step after another, and then very light user transactional workload during the day, would it be sensible to size the CPU count for the daily usage given that the batch processes run one at a time, and outside of normal user activity?

是的,但是你可以争辩说你在这里做得很好。任何类型的异常行为 (例如用户adhoc查询) 都可能影响常规活动。

*) I believe we can specify a maximum number of CPU cores for Oracle to use. Say I have a 16 core server running 2 Oracle instances, and I limited each instance to 8 cores - how would Oracle use those cores? Would the both attempt to use only the first 8 and the remaining 8 would be unused? Or would it use all 16, but only a maximum of 8 concurrently, and let the OS choose which ones to multiplex the work threads on?


我们不 * 绑定 * 到核心,我们只是使用 “8核心的价值”。因此,即使您只有1个Oracle实例,在16核心计算机上 (该实例限制为8核心),然后随着时间的推移,您会看到每台机器16核心将运行 (最多) 大约50% 容量,即,在任何时刻,我们都不消耗超过8个核心的工作。

我要说的一件事是-当涉及到标准版时,您需要与您的客户经理密切合作,并仔细阅读重新注册物理机器的许可证详细信息。可能有点雷区... 我希望不是。
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论