turbogears的性能好像很差

1 view
Skip to first unread message

Pan Menghan

unread,
Oct 15, 2006, 6:26:44 AM10/15/06
to python.cn
系统是debian3.1, python2.4.1, apache2.0.54, mod_python3.2.10,
turbogears1.0b1, django0.95

压力测试工具是Siege v2.65
http://www.joedog.org/

例子是用turobogears的wiki20,
在concurrent大于3的时候基本上turbogears就会挂

而用limodou的wiki例子的django,
可以在mod_python的情况下在concurrent100以上也没有挂,
就是有时会失去响应.

JackPhil

unread,
Oct 15, 2006, 10:50:34 PM10/15/06
to python.cn
turbo也是用mod_python吗,否则应该没有可比性

Pan Menghan

unread,
Oct 16, 2006, 5:57:51 AM10/16/06
to python.cn
不管是不是在apache后面, turbo还是3以上就要挂,
而django可以在80-100

gas...@gmail.com

unread,
Oct 16, 2006, 10:35:12 AM10/16/06
to python.cn
TurboGears 也可以挂在 mod_python 后面, 不过我没试过.

有些网站已经在用 TurboGears 在服务啦,
性能应该没那么糟吧.
TG 在 1.0 版的目标是在操作性, 相容性, 和文件上,
主要的目标里是没强调速度.

测试数据里 TurboGears 还有很多可以调整的部份,
要模板快可以换 genshi 或 django template,要 ORM
弹性可以换 sqlalchemy, 另外 1.1 版核心换成 CherryPy 3
后就可以享受 CherryPy 3 号称比CherryPy 2 快三倍的效能.

再过几个月 TurboGears 效能这方面应该会大有进展吧

lew ghiewa

unread,
Oct 16, 2006, 12:06:34 PM10/16/06
to pyth...@googlegroups.com
建议gasolin,发个邮件到turbogears邮件组中讨论讨论,看问题是否如此!!!!

gas...@gmail.com

unread,
Oct 16, 2006, 12:29:40 PM10/16/06
to python.cn
请问在测试时有将 prod.cfg (发布设定) 设起来吗?
(开发时用的是 dev.cfg), 这应该会差不少?

gas...@gmail.com

unread,
Oct 16, 2006, 11:21:25 PM10/16/06
to python.cn

lew ghiewa

unread,
Oct 17, 2006, 10:32:07 AM10/17/06
to pyth...@googlegroups.com
看了,情况比较悲观呢!!哈哈
 
 
  正向里面一个大拿说的 当初选择TG 完全是看在其组成的组件的成熟度啊  没有考虑到性能啊  晕

 

gas...@gmail.com

unread,
Oct 17, 2006, 2:29:56 PM10/17/06
to python.cn
lew ghiewa wrote:
>
> 正向里面一个大拿说的 当初选择TG 完全是看在其组成的组件的成熟度啊 没有考虑到性能啊 晕


> While I started my journey three months back,
> had thought for Django as well, but chose Turbogears due to some technical superiority.

technical superiority
应该不是翻成"组成的组件的成熟度"吧?

不过说实话我选择学 TG 时也没有考虑到性能问题,
就像学 python 时没有考虑工作机会问题一样,
都只是因为它的程式码漂亮, 好写.
我想他要表达的也是类似的意思吧.


你可以試試使用 TG 提供服務的站點如 http://diggdot.us/
http://www.oprius.com/ 看看會不會出現上述情形.

就如 Linux 发布套件一样, 只要有人继续开发各种 python
网站模组, TG 未来版本性能/易用度提升是可以期待的.

根據測試目前 python 好像比 Ruby 快三倍,
同样的话也可以这样说: 当初选择 Ruby on Rails
完全是看在其组成的组件的成熟度. 没有考虑到性能啊
晕? :-D

piggy

unread,
Oct 18, 2006, 12:57:29 AM10/18/06
to python.cn
well,
我当初选择rails是因为已经有不少上规模的网站在跑了,性能不会有什么大问题。另外当时的django代码不太稳定,文档也比较缺乏,现在好多了。

shinwell.lee

unread,
Oct 21, 2006, 10:35:23 AM10/21/06
to python.cn

Pan Menghan 写道:

不知道楼主怎么测试的?
我用ab测试了1000请求100并发, turbogears很稳定啊,
每秒处理请求在20个左右.
我也没用apache + mod_python.

同时我也简单地测试了django的性能,
感觉和turbogears差别不大, 比方下面一个简单的
action:
-------------------------------------------------------------------------------
from django.http import HttpResponse

text = """<form method="post" action="/add/">
<input type="text" name="a" value="%d"> + <input type="text"
name="b" value="%d">
<input type="submit" value="="> <input type="text" value="%d">
</form>"""

def index(request):
if request.POST.has_key('a'):
a = int(request.POST['a'])
b = int(request.POST['b'])
else:
a = 0
b = 0
return HttpResponse(text % (a, b, a + b))
-------------------------------------------------------------------------------
用ab测试了1000请求100并发, 每秒处理请求在25个左右,
当然这个和wiki20那个不能比,
这个没有数据库查询, 也没有用到模板.

我没有linux环境, XP下装了个cygwin,
折腾了半天那个siege还是编译不了, 最后放弃了:-(((

Reply all
Reply to author
Forward
0 new messages