低开销选择以确定当前服务器负载 [英] low overhead select to determine current server load
问题描述
在仓库应用程序中,我们的Java客户端[可以]不断地将行
加载/插入数据库。我想基于服务器的当前忙碌状态从Java应用程序中限制这些插入(每百万行每小时150万行)。
它会如果我能从db2通过jdbc获得服务器CPU利用率(以及其他关键的
因子),那就太好了。但是,它需要低成本,因为它可能每隔x秒运行
。
系统:db2 v 9.1 64位Centos 4.3 64位。
谢谢。
nat
On a warehouse app, our Java clients [can] constantly load/insert rows
into the db. I would like to throttle these inserts (1.5 million rows per
hr) from the Java app, based on current ''busy state'' of the server.
It would be nice if I can get the server CPU utilization (and other key
factors) from db2 via jdbc. However, it needs to be low cost, since it
would likely run every x seconds.
System: db2 v 9.1 64bit on Centos 4.3 64 bit.
Thank you.
nat
推荐答案
natG写道:
natG wrote:
在仓库应用程序中,我们的Java客户端[可以]不断地将行
加载/插入数据库。我想基于服务器的当前忙碌状态从Java应用程序中限制这些插入(每百万行每小时150万行)。
它会如果我能从db2通过jdbc获得服务器CPU利用率(以及其他关键的
因子),那就太好了。但是,它需要低成本,因为它可能每隔x秒运行
。
On a warehouse app, our Java clients [can] constantly load/insert rows
into the db. I would like to throttle these inserts (1.5 million rows per
hr) from the Java app, based on current ''busy state'' of the server.
It would be nice if I can get the server CPU utilization (and other key
factors) from db2 via jdbc. However, it needs to be low cost, since it
would likely run every x seconds.
我不认为DB2提供了一个接口来检索那种
信息。但您可以使用用户定义的函数(UDF)。可以使用VALUES< fct>()调用
函数,它可以轻松获得
。
-
Knut Stolze
DB2信息集成开发
IBM德国
I don''t think that DB2 provides an interface to retrieve that kind of
information. But you could resort to a user-defined function (UDF). The
function can be called using "VALUES <fct>()", which is as light-weight as
it can possible get.
--
Knut Stolze
DB2 Information Integration Development
IBM Germany
On Mon,28 Aug 2006 12:19:27 +0200,Knut Stolze写道:
On Mon, 28 Aug 2006 12:19:27 +0200, Knut Stolze wrote:
natG写道:
natG wrote:
>在仓库应用程序中,我们的Java客户端[可以]不断地将行加载/插入到数据库中。我想根据服务器当前的繁忙状态从Java应用程序中限制这些插入(每小时150万行)。
如果我能得到服务器那就太好了来自db2到jdbc的CPU利用率(以及其他关键因素)。但是,它需要低成本,因为它可能每x秒运行一次。
>On a warehouse app, our Java clients [can] constantly load/insert rows
into the db. I would like to throttle these inserts (1.5 million rows per
hr) from the Java app, based on current ''busy state'' of the server.
It would be nice if I can get the server CPU utilization (and other key
factors) from db2 via jdbc. However, it needs to be low cost, since it
would likely run every x seconds.
我不认为DB2提供了一个接口来检索那种
信息。但您可以使用用户定义的函数(UDF)。可以使用VALUES< fct>()来调用
函数,它可以轻松获得
。
I don''t think that DB2 provides an interface to retrieve that kind of
information. But you could resort to a user-defined function (UDF). The
function can be called using "VALUES <fct>()", which is as light-weight as
it can possible get.
hmmm ...但我不知道该功能需要做什么。是否有报告服务器负载的db2
函数?或者每秒多少次插入它现在*,或者它做了多少tps。
谢谢
nat
hmmm... But I have no idea what the function needs to do. Is there a db2
function that reports server load? Or how many inserts per second its
doing *now*, or how many tps its doing.
Thanks
nat
natG写道:
natG wrote:
On Mon,28 Aug 2006 12:19:27 +0200,Knut Stolze写道:
On Mon, 28 Aug 2006 12:19:27 +0200, Knut Stolze wrote:
> natG写道:
>natG wrote:
>>在仓库应用程序中,我们的Java客户端[可以]不断地将行加载/插入到数据库中。我想基于服务器当前的繁忙状态从Java应用程序中限制这些插入(每小时150万行
)。
如果我可以获得服务器那将是很好的来自db2到jdbc的CPU利用率(以及其他关键因素)。但是,它需要低成本,因为它可能每x秒运行一次。
>>On a warehouse app, our Java clients [can] constantly load/insert rows
into the db. I would like to throttle these inserts (1.5 million rows
per hr) from the Java app, based on current ''busy state'' of the server.
It would be nice if I can get the server CPU utilization (and other key
factors) from db2 via jdbc. However, it needs to be low cost, since it
would likely run every x seconds.
我不认为DB2提供了一个接口来检索那种信息。但您可以使用用户定义的函数(UDF)。可以使用VALUES< fct>()来调用
函数,它尽可能轻量化。
I don''t think that DB2 provides an interface to retrieve that kind of
information. But you could resort to a user-defined function (UDF). The
function can be called using "VALUES <fct>()", which is as light-weight
as it can possible get.
嗯...但我不知道该功能需要做什么。是否有报告服务器负载的db2
函数?或者每秒多少次插入它现在*,或者它做了多少tps。
hmmm... But I have no idea what the function needs to do. Is there a db2
function that reports server load? Or how many inserts per second its
doing *now*, or how many tps its doing.
我以为你对CPU利用率感兴趣。对于
每秒插入/事务,您可以使用DB2快照
和事件监视器设施。
如果是是你负载的CPU负载,我们真的在谈论一个系统
调用。问题是你的DB2服务器正在运行哪个OS平台
on。
-
Knut Stolze
DB2信息集成开发
IBM德国
I thought you were interested in the CPU utilization. For the
inserts/transactions per second thing, you could employ the DB2 snapshot
and event monitor facilities.
If it is the CPU load you''re after, we are really talking about a system
call. The question is then which OS platform your DB2 server is running
on.
--
Knut Stolze
DB2 Information Integration Development
IBM Germany
这篇关于低开销选择以确定当前服务器负载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!