High cpu load and comet (latency)

47 views
Skip to first unread message

Alexander Bertram

unread,
Oct 14, 2012, 6:41:31 AM10/14/12
to lif...@googlegroups.com
Hi,

I develop an application where I use Akka-actors ant Lift. The backend causes high cpu load (> 95%). I use comet actors to update the frontend. When I start the application, it works as expected. But after a while frontend update frequency decreases. At the end it won't be updated at all. The backend works as expected.

After 6 minutes uptime a comet request takes up to 40 seconds (according to Chrome Developer Tools).

Is there something I can do?

Alex

Vasya Novikov

unread,
Oct 14, 2012, 8:45:57 AM10/14/12
to lif...@googlegroups.com
I used akka actors in a project and everything was OK.
If you're saying that it's getting worse over time -- I suspect an increasing number of messages being sent between actors. I'd log the mailbox size and see what it tells.

Antonio Salazar Cardozo

unread,
Oct 14, 2012, 3:30:31 PM10/14/12
to lif...@googlegroups.com
Long-running comet requests are not a problem, they're the system functioning correctly. A comet request should last up to 120 seconds. If your request is taking 40 seconds, that means it takes 40 seconds for the comet actor on the server to send something to the client, which is perfectly normal. Now, if you're expecting updates more frequently, it's more likely that the load the backend is causing isn't allowing the comet actors to actually run, so they don't get a chance to send their responses back down to the client.

To be sure of what exactly is going on, however, we'd need to see it in action. See https://www.assembla.com/spaces/liftweb/wiki/Posting_example_code for more. Also consider using a profiler like VisualVM or YourKit to get an inner look at what exactly is taking up CPU time and such.
Thanks,
Antonio

Alexander Bertram

unread,
Oct 14, 2012, 3:50:15 PM10/14/12
to lif...@googlegroups.com
Thanks for the responses. I'll take a look into my backend.

Alex
Reply all
Reply to author
Forward
0 new messages