0

In a web game built on Turbogears v2.1.5, logged-in users POST a 16-byte message periodically. The server CPU reaches 100% when the POST rate is 60 POSTs-per-second. (For testing, we have removed all work such as updating the DB with each post-- the server simply returns an empty response immediately.)

Using wrk to GET a 16-byte static file we see Turbogears reaching rates of ~500 requests-per-second and want to match or get close to that rate with our game's POSTs. We'd really like to be at 1,000 or more POSTs per second.

Setup: Turbogears v2.1.5, AWS c3.large, Windows Server 2008 R2, Intel Xeon, E5-2680 v2 @ 2.8Ghz 2.8Ghz.

Question: Are there tg2 settings or other changes that would let us in this scenario handle 500 or more POSTs-per-second?

4

1 回答 1

1

如果您能够升级到 TG2.3,则最新版本中的工作大大提高了开箱即用的框架性能 ( http://blog.axant.it/archives/452 )。

此外,通过 2.3 中引入的新最小模式(http://turbogears.readthedocs.io/en/latest/turbogears/minimal/index.html),您可以轻松禁用任何您不需要的组件,例如 i18n、会话等。如需更多速度改进(请参阅http://turbogears.readthedocs.io/en/latest/reference/config-options.htmlX.enabled上的各种选项)。禁用 i18n 和静态文件支持通常会带来良好的性能提升。

于 2017-02-25T16:06:58.747 回答