« 回忆我那4天的旅游-在路上 | (回到Blog入口) | 关于归档日志空间满这件事 »

关于应用可扩展性

使用oracle数据库开发应用,对于应用的扩展性,一直以为绑定变量是最重要的。
现在知道,连接方式也是非常重要的。

有2个应用和oracle文档的说明让我认识到这点。2个应用有点类似,号称3层架构,使用了websphere中间件,但是客户端直接连接数据库,没有使用连接池。
每处理一条业务,要连接3次数据库,处理完成就断开。

每秒要处理2条业务,数据库连接7次左右。

结果是:
一个应用发生过2次telnet不上的情况,虽然业务还在跑,当时没有办法连接上去看系统性能,估计是内存耗尽导致。
另外一个应用每秒处理业务逐渐降低,具体原因还不是很清楚,但是在改用连接池后,性能提高了有10倍。

看看oracle官方文档的说明:
Oracle9i Database Performance Planning Release 2 (9.2)
Part Number A96532-01

Good Database Connection Management

Connecting to the database is an expensive operation that is highly unscalable. Therefore, the number of concurrent connections to the database should be minimized as much as possible. A simple system, where a user connects at application initialization, is ideal. However, in a Web-based or multitiered application, where application servers are used to multiplex database connections to users, this can be difficult. With these types of applications, design efforts should ensure that database connections are pooled and are not reestablished for each user request.

引用通告

TrackBack URL for this entry:
如果您想引用这篇文章到您的Blog,
请复制下面的链接,并放置到您发表文章的相应界面中。
http://www.fengshanjian.net/cgi-bin/mt/mt-tb.cgi/283

发表一个评论

(如果你此前从未在此 Blog 上发表过评论,则你的评论必须在 Blog 主人验证后才能显示,请你耐心等候。)

关于

此页面包含了发表于2007年07月29日 下午06时35分的 Blog 上的单篇日记。

此 Blog 的前一篇日记是 回忆我那4天的旅游-在路上

此 Blog 的后一篇日记是 关于归档日志空间满这件事

更多信息可在 主索引 页和 归档 页看到。

Powered by
Movable Type 3.34