It is currently Fri May 03, 2024 2:23 am


The forum is READ ONLY. Please direct any future discussions to our Facebook page


 Page 1 of 1 [ 7 posts ] 
Author Message
 Post subject: Speed of the Beta
PostPosted: Fri May 19, 2006 3:22 pm 
AA Mega-Trader
AA Mega-Trader
User avatar

Joined: Thu Sep 18, 2003 2:20 am
Posts: 323
Location: Rotorua, New Zealand
I know the beta has had to be moved, but is anyone having speed issues???

I can't get around and upgrade 5 planets within the 5min timer. It takes at least 2 turn ticks and sometimes 3. This has been an issue for me for tha last few days. :(
No time out errors just heaps of waiting for the each page to be created.
It seems to be with the planet coded pages.

There is no way I can even think of trying to attack anybody.

It also looks related to the number of players online. Just dropped down to 2 and seems a bitt better.



_________________
Alf (Alien life form)
http://www.cole.gen.nz
Rotorua, New Zealand
Offline
 Profile  
 
 Post subject: Re: Speed of the Beta
PostPosted: Fri May 19, 2006 3:51 pm 
Site Admin
Site Admin
User avatar

Joined: Wed Feb 19, 2003 12:17 pm
Posts: 2619
It all depends on if some slug is sending attachments via my mailserver. We have the old server location back up and running and Jeff told me we could run the beta on his servers as well if we wanted to. We are trying to decide what the best solution is.

Alf wrote:
I know the beta has had to be moved, but is anyone having speed issues???

I can't get around and upgrade 5 planets within the 5min timer. It takes at least 2 turn ticks and sometimes 3. This has been an issue for me for tha last few days. :(
No time out errors just heaps of waiting for the each page to be created.
It seems to be with the planet coded pages.

There is no way I can even think of trying to attack anybody.

It also looks related to the number of players online. Just dropped down to 2 and seems a bitt better.


Offline
 Profile  
 
 Post subject:
PostPosted: Fri May 19, 2006 4:54 pm 
Developer
Developer
User avatar

Joined: Wed Feb 19, 2003 6:07 pm
Posts: 2930
Yeah, there are times when the mail server uses the majority of the bandwidth available during the daytime hours. Usually after about 7pm CDT the mail processing drops to a tiny amount and there is more bandwidth available.

We may move everything back to the other server this weekend.

I spent all last night making changes to the log system to make it modular. I have also been rewriting a number of the scheduler routines. It's amazing that I have been able to get rid of just about every query inside loops.

The only two schedulers that really have any queries inside loops are the sched_ranking.inc which has 13 queries for every player in the game. Fortunately this only runs once every 2.5 hours. But unfortunately it can cause the largest load on the database server. If you have 100 players in a game there would be over 1,300 queries to calculate the score. I may end up trying some real time score calculation. I have a few ideas for that but will need to do some extensive testing.

The other query loop is the sched_degrade.inc which removed energy from planets in a sector for all sector defense and degrades any fighters if there isn't enough energy. I have reduced to a single query the reducing of sector fighters if there isn't enough energy. That was a cool change. :) Unfortunately I have only been able to get the updating of energy for every planet in a sector to only ONE query for each fighter group. This used to be 3 and then 2 and now down to a single query for each one. If there are 1,000 sectors with sector fighters there could be over 1,000 queries to process all of the sector defense. :P

If you don't count the sched_degrade.inc and sched_ranking.inc the average number of queries to update everything in the game is under 80 and that is pretty damned small considering what the game is doing. :)

If things go well we will move things back this weekend.



_________________
PJ's Annoyingly Useless Blog
ADOdb Lite
Template Lite
Offline
 Profile  
 
 Post subject: WOOT!
PostPosted: Fri May 19, 2006 8:21 pm 
Developer
Developer
User avatar

Joined: Wed Feb 19, 2003 6:07 pm
Posts: 2930
Well it took 4 hours of work and rewritten the sched_ranking.inc so it no longer uses a query loop to calculate player scores. :) It can now do it in one pass. The only loop is the update query for each player that stores the score.

There are now only 27 queries that are executed to calculate the score for every single player in the game. Plus a single update query for each player.

As an example in the current Beta Game there are 37 players and the scheduler processed 1,725 queries with the old sched_ranking.inc. I installed the new sched_ranking.inc and the same schedule run only took 158 queries. :clap:

This also reduced the amount of time the scheduler took to execute. :D Instead of over 2 seconds it took less than a second. :bigthumb: Actually it was so fast it claimed 0 seconds execution time. ;) This was even with the 60+ queries to process the sector defense energy usage.

Now all I have to do is figure out a way to do a single query update for the energy usage from planets by the sector defense. Once that is accomplished the scheduler is going to be the fastest and lowest resource usage you can possibly get. :D



_________________
PJ's Annoyingly Useless Blog
ADOdb Lite
Template Lite
Offline
 Profile  
 
 Post subject:
PostPosted: Mon May 29, 2006 1:56 am 
Gamer
Gamer

Joined: Fri May 07, 2004 12:17 pm
Posts: 191
PJ, you are just freaking amazing, you know that?



_________________
Click HERE to see chicks!
Offline
 Profile  
 
 Post subject:
PostPosted: Thu Jun 01, 2006 10:00 pm 
Forum Roamer
Forum Roamer

Joined: Thu Jan 08, 2004 1:04 am
Posts: 58
Max Griswald wrote:
PJ, you are just freaking amazing, you know that?

:P Of course he knows that! Everyone needs a little ego boost now and then. :cool:


Offline
 Profile  
 
 Post subject:
PostPosted: Fri Jun 02, 2006 11:51 am 
AA Trader
AA Trader
User avatar

Joined: Sat Feb 12, 2005 3:20 pm
Posts: 207
Location: US.
Even more amazing when you can get em to consider some needed changes in the game code/settings. :)


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 7 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  

cron