[Twisted-Python] CPU usage.
![](https://secure.gravatar.com/avatar/68a3e534292b681267cc280088f42c18.jpg?s=120&d=mm&r=g)
hi I use twisted to build some web services, using twistd to start a application. When I start the twistd, and without any connection, the cpu usage of twistd process comes to about 10%. I don't think it's normal. I think it should be much low than this num. But I don't know how to find the problem is.Would anyone be pleased to help me? Thanks.
![](https://secure.gravatar.com/avatar/68a3e534292b681267cc280088f42c18.jpg?s=120&d=mm&r=g)
hi I use twisted to build some web services, using twistd to start a application. When I start the twistd, and without any connection, the cpu usage of twistd process comes to about 10%. I don't think it's normal. I think it should be much low than this num. But I don't know how to find the problem is.Would anyone be pleased to help me? Thanks.
![](https://secure.gravatar.com/avatar/d7875f8cfd8ba9262bfff2bf6f6f9b35.jpg?s=120&d=mm&r=g)
On 04/26/2012 02:14 AM, 黄 轶明 wrote:
hi
I use twisted to build some web services, using twistd to start a application.
When I start the twistd, and without any connection, the cpu usage of twistd process comes to about 10%.
I don't think it's normal. I think it should be much low than this num.
But I don't know how to find the problem is.Would anyone be pleased to help me?
Twisted doesn't use 10% CPU by default; chances are it's some code you wrote. Have you tried using a profiler (e.g. cProfile)?
![](https://secure.gravatar.com/avatar/68a3e534292b681267cc280088f42c18.jpg?s=120&d=mm&r=g)
How can i use cProfile with twisted? Is there any guide or example? Thank you very much. I googled and stackoverflowed ,but didn't find any examples. 在 2012-4-26,下午6:00, Itamar Turner-Trauring 写道:
On 04/26/2012 02:14 AM, 黄 轶明 wrote:
hi
I use twisted to build some web services, using twistd to start a application.
When I start the twistd, and without any connection, the cpu usage of twistd process comes to about 10%.
I don't think it's normal. I think it should be much low than this num.
But I don't know how to find the problem is.Would anyone be pleased to help me?
Twisted doesn't use 10% CPU by default; chances are it's some code you wrote. Have you tried using a profiler (e.g. cProfile)?
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
![](https://secure.gravatar.com/avatar/b21dcd444b9c16ac6bf50cda1999265a.jpg?s=120&d=mm&r=g)
2012/4/27 黄 轶明 <hoooooosety@gmail.com>
How can i use cProfile with twisted?
Is there any guide or example?
Thank you very much. I googled and stackoverflowed ,but didn't find any examples.
在 2012-4-26,下午6:00, Itamar Turner-Trauring 写道:
On 04/26/2012 02:14 AM, 黄 轶明 wrote:
hi
I use twisted to build some web services, using twistd to start a application.
When I start the twistd, and without any connection, the cpu usage of twistd process comes to about 10%.
I don't think it's normal. I think it should be much low than this num.
But I don't know how to find the problem is.Would anyone be pleased to help me?
Twisted doesn't use 10% CPU by default; chances are it's some code you wrote. Have you tried using a profiler (e.g. cProfile)?
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Hi you may look at http://docs.python.org/library/profile.html for some details. Regards gelin yan
participants (3)
-
gelin yan
-
Itamar Turner-Trauring
-
黄 轶明