Loading CPU after few days of SFS uptime

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

User avatar
Johannes
Posts: 32
Joined: 14 Oct 2008, 06:01
Location: Earth

Loading CPU after few days of SFS uptime

Postby Johannes » 05 Jul 2010, 10:40

Hello.
I have a strange problem.
SFS is loading my CPU too hard after few days of working. So I compelled to restart SFS every few days.

Also I observed that when load become too high, I can't view Zone Browser through AdminTool: I can view all others parts of AdminTool (Ban Manager, Logs, Extensios, Config etc.) but when I try to open Zone Browser connection with server breaks immediatly...

We have no some errors in logs. I don't know what it is. But at monents of high loads I can see in linux-terminal thought "top" command that mysql-java bundle is always in top

___________
MySQL version: 5.0.67
SFS Pro 1.6.6
java version "1.6.0" (Java(TM) SE Runtime Environment)
Don't worry, be happy! :)
corwin
Posts: 77
Joined: 17 Jul 2009, 08:19

Postby corwin » 05 Jul 2010, 10:44

I have absolutely the same behaviour - the period is about a week, then I get 100% cpu. Also when open admin tool can't see any stats from it. No errors in the logs too...

Edit: I am with 1.6.7...
User avatar
Lapo
Site Admin
Posts: 21119
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 05 Jul 2010, 15:44

Johannes
If the mysql-java process is taking all the CPU then you should check your DBManager configuration and the number of connections/queries to your database.
Maybe you have some heavy DB activity going on which is taking too many resources or so.

corwin
The same behavior including the mysql-java process?
Lapo
--
gotoAndPlay()
...addicted to flash games
corwin
Posts: 77
Joined: 17 Jul 2009, 08:19

Postby corwin » 06 Jul 2010, 07:26

I have mysql connections, but I think the problem it is not related. I have hours with much more users, making more queries, but the server is ok. The problem always occurs at least some days after server start and when cpu go high once, it does not go back ok unless restart.
Also I have all my inserts and updates in separate threads, and really have not so many selects.
P.S. Yesterday, when the problem happened again I saw that the memory of the sfs process constantly goes high and than lowers for two-three seconds. I guess that cpu is high because of garbage collection?
User avatar
Johannes
Posts: 32
Joined: 14 Oct 2008, 06:01
Location: Earth

Postby Johannes » 06 Jul 2010, 09:51

corwin wrote:...when the problem happened again I saw that the memory of the sfs process constantly goes high and than lowers for two-three seconds. I guess that cpu is high because of garbage collection?


I have absolutely same symptoms as you have.
Don't worry, be happy! :)
User avatar
Lapo
Site Admin
Posts: 21119
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 06 Jul 2010, 12:45

What is not clear is if it's the SmartFox process that takes all the CPU or the mysql-java.
Using a simple tool like jconsole ( http://java.sun.com/developer/technical ... nsole.html ) or the more powerful VisualVM ( https://visualvm.dev.java.net/ ) you can see exactly what is going on with the garbage collection.

Maybe you just need to fine tune the JVM memory, or maybe there's a memory leak. Difficult to say with just a few informations.

Another cause for performance issues is the number of threads in the JVM, if you are creating custom threads in your code make sure to take a look at their number.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 6 guests