smartfoxserver.com Forum Index
Author Message
<  Server Side Extension Development  ~  Server load problems
Post new topic   Reply to topic

corwin
PostPosted: Fri Jun 04, 2010 8:26 am  Reply with quote



Joined: 17 Jul 2009
Posts: 76

Hi, we had some complains that there is big lag with the sf server and responses are later (3-4 seconds lag):
When I checked the server:
1. Usually the sfs stays at 1%, this time it was at 99%.
2. There were constantly 100 messages in the extension queue.
3. There were some users with "undefined" name.
4. We had 500 users and 300 rooms online - pretty strange, as we have temporary rooms and games are played by 2 people, also there are people in the lobby.
5. The strangest thing - the smartfox admin tool showed that our total VM memory is 3G, when we set it to 2.8G, and I am sure that it is usually correctly displayed in the admin tool.
Restart fixed all the problems, but I wonder what were the causes..
The sole thing I can think of is the max message queue - it currently is set to 200, and evenings we have about 1500 people. I guess we can decrease it to 50, but is that possible reason and does somebody have any other ideas?


P.S. What does ./sfs dump do? I saw it invokes kill -3, I guess you handle it in your code and do sth, but what and where? Smile
Back to top
View user's profile Send private message
Lapo
PostPosted: Fri Jun 04, 2010 10:30 pm  Reply with quote
Site Admin


Joined: 21 Mar 2005
Posts: 9308
Location: Italy

Sounds like the typical threading problem with the database, it's just a matter of configuring theads so that they allow you to scale properly.

The quick answer here is: augment the <ExtHandlerThreads> to 4-6 and you'll see the problem vanish or reduce dramatically.

The reasons are explained here:
http://www.smartfoxserver.com/docs/docPages/sfsPro/threadSafety.htm

_________________
Lapo
--
gotoAndPlay()
...addicted to flash games
Back to top
View user's profile Send private message
Display posts from previous:   
All times are GMT

View next topic
View previous topic
Page 1 of 1
smartfoxserver.com Forum Index  ~  Server Side Extension Development

Post new topic   Reply to topic


 
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB