Will doCould you start a game with just a single AI and pass turns until it becomes slow, then post the logs again?
AI is tooooooo slow
Moderator: Oberlus
Forum rules
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Re: AI is tooooooo slow
Re: AI is tooooooo slow
Update.
Playing new game 6 AIs 150 stars.
Up until turn 88, the AIs took a consistent 10 seconds to finish.
On turn 88 it went up to 35 seconds.
On turn 90 it was 55 seconds.
Playing 2016-08-02 test build.
I've attached a save game file for turn 90
Playing new game 6 AIs 150 stars.
Up until turn 88, the AIs took a consistent 10 seconds to finish.
On turn 88 it went up to 35 seconds.
On turn 90 it was 55 seconds.
Playing 2016-08-02 test build.
I've attached a save game file for turn 90
- Attachments
-
[The extension sav has been deactivated and can no longer be displayed.]
Re: AI is tooooooo slow
Just want to chime in and say that all my FreeOrion playing was done on a XP machine. By the time my turn started all AIs had finished their turns already.
My PC is dual core however, so maybe OP's single core processor is what's causing these issues.
My PC is dual core however, so maybe OP's single core processor is what's causing these issues.
Re: AI is tooooooo slow
OK, I am on turn 192 of a 1 AI 100 star game.Morlic wrote: A lot of time seems to be spent waiting while other AIs are handled ... Could you start a game with just a single AI and pass turns until it becomes slow, then post the logs again?
There is very little delay. AI takes only 5 or 6 seconds to finish.
Before I would have been waiting 5 or more minutes at this point.
Do you want to see the AI log?
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: AI is tooooooo slow
Does the increase just happen if you play the same game from start to whatever turn it gets slow, without saving, quitting, and reloading? Does saving, quitting, and reloading improve turn processing times (after 1-2 turns of playing to get things to settle down after the reload...)
Re: AI is tooooooo slow
Done all these. Does not improve turn processing times.Geoff the Medio wrote:Does the increase just happen if you play the same game from start to whatever turn it gets slow, without saving, quitting, and reloading? Does saving, quitting, and reloading improve turn processing times (after 1-2 turns of playing to get things to settle down after the reload...)
(I did not try re-booting, tho)
As stated above, what did dramatically improve performance was playing against only one AI.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: AI is tooooooo slow
What does your system's memory use vs. time graph look like when processing a turn? Perhaps too many AIs are trying to allocate a bunch of memory to deserialize all at once, which is causing a bunch of swapping in/out with the hard drive?
Re: AI is tooooooo slow
OK, some interesting things to report.
I went back and reloaded the 6 AI game.
Reloading it does seem to have made the turns go faster.
They take about 20 seconds or so
(up from the 10 from pre turn 88, but less than the 55 of turn 90).
Looking at the Task manager it looks like the FreeorionCA processes are still only taking about 10 seconds to finish, but the Freeoriond process sucks up the rest of the cpu for the next 10 seconds.
Played till turn 97 and this pattern has been pretty consistent.
Paging file use does not appear to be unusual.
I went back and reloaded the 6 AI game.
Reloading it does seem to have made the turns go faster.
They take about 20 seconds or so
(up from the 10 from pre turn 88, but less than the 55 of turn 90).
Looking at the Task manager it looks like the FreeorionCA processes are still only taking about 10 seconds to finish, but the Freeoriond process sucks up the rest of the cpu for the next 10 seconds.
Played till turn 97 and this pattern has been pretty consistent.
Paging file use does not appear to be unusual.
Re: AI is tooooooo slow
I've been playing a new game. Latest test build from Oct 12.
200 stars 4 AI's
I'm on around turn 200. Turns take on average about 5 minutes to complete.
That is most turns take around 5 minutes. A few turns will take 10 minutes and a few turns will take less than a minute.
I have about 90 ships. From the ship count graph I would guestemate one AI has about 150 ships while two more have around 130. The fourth AI has been eliminated.
From all this info I would assume I am losing, but I would really like to finish this game and see if I can pull it off as most of the times I do not get challenged. However, I'm not sure if I can, because of the turn lengths.
I attached some logs right after a seven minute long turn.
All the AI logs are well over 2 Megs.
Let me know if you need them and we can work something out.
Sorry, but I may have to leave and come back to this game when this has gotten better.
It is evidently too much for my single core 32 bit machine.
200 stars 4 AI's
I'm on around turn 200. Turns take on average about 5 minutes to complete.
That is most turns take around 5 minutes. A few turns will take 10 minutes and a few turns will take less than a minute.
I have about 90 ships. From the ship count graph I would guestemate one AI has about 150 ships while two more have around 130. The fourth AI has been eliminated.
From all this info I would assume I am losing, but I would really like to finish this game and see if I can pull it off as most of the times I do not get challenged. However, I'm not sure if I can, because of the turn lengths.
I attached some logs right after a seven minute long turn.
All the AI logs are well over 2 Megs.
Let me know if you need them and we can work something out.
Sorry, but I may have to leave and come back to this game when this has gotten better.
It is evidently too much for my single core 32 bit machine.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: AI is tooooooo slow
First thing I suggest is switching the save format to binary: Options / Other / Create Binary Save File. It currently looks like it's taking ~30 seconds each save to do the actual saving.EricF wrote:I attached some logs right after a seven minute long turn.
Otherwise, it looks like the biggest gaps in the server log are due to AIs taking a long time... several minute gaps between the same AI requesting a new object ID, for example, with nothing else happening in that time.
As such, posting an AI log might be helpful. You could perhaps zip it first?
And just update an AI log after playing one or two turns after starting the game / loading the save, not several turns which will make the log file longer / bigger.
Re: AI is tooooooo slow
OK, got a chance to play again.
Here are the logs after a long turn 5+ minutes.
Here are the logs after a long turn 5+ minutes.
Re: AI is tooooooo slow
The rest
It doesn't really slow down until a few turns are played. Maybe 3-5.
Might be able to use that to get through this game.
After reloading a save the game turns go by fairly quickly.It doesn't really slow down until a few turns are played. Maybe 3-5.
Might be able to use that to get through this game.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: AI is tooooooo slow
Could you watch the memory usage of the AI processes over that time? Perhaps it increases each turn a similar amount, or suddenly jumps on the turn of the big slowdown?EricF wrote:After reloading a save the game turns go by fairly quickly.
It doesn't really slow down until a few turns are played. Maybe 3-5.
From the biggest AI log, it looks like it's spending lots of time doing meter updates. But there's also a lot of unexplained (from just the log) 5 second jumps in the timestamps of log messages:
Code: Select all
2016-10-30 07:08:43.656250 [debug] AI : LoggingWrapper.cpp:23 : - enemyval: 0
2016-10-30 07:08:43.656250 [debug] AI : LoggingWrapper.cpp:23 : planet 311, values [0.0, 101.80000305175781]
2016-10-30 07:08:48.625000 [debug] AI : LoggingWrapper.cpp:23 : Generating fleet orders
2016-10-30 07:08:48.625000 [debug] AI : LoggingWrapper.cpp:23 : Fleets by Role
2016-10-30 07:08:48.625000 [debug] AI : LoggingWrapper.cpp:23 :
2016-10-30 07:08:48.640625 [debug] AI : LoggingWrapper.cpp:23 : Exploration Fleets: []
2016-10-30 07:08:48.640625 [debug] AI : LoggingWrapper.cpp:23 : Colonization Fleets: []
2016-10-30 07:08:48.656250 [debug] AI : LoggingWrapper.cpp:23 : Outpost Fleets: []
2016-10-30 07:08:53.609375 [debug] AI : LoggingWrapper.cpp:23 : Invasion Fleets: []
2016-10-30 07:08:53.625000 [debug] AI : LoggingWrapper.cpp:23 : Military Fleets: []
2016-10-30 07:08:53.625000 [debug] AI : LoggingWrapper.cpp:23 : Orbital Defense Fleets: [1093, 1094, 1095, 1523, 1826]
2016-10-30 07:08:53.640625 [debug] AI : LoggingWrapper.cpp:23 : Outpost Base Fleets: []
2016-10-30 07:08:53.656250 [debug] AI : LoggingWrapper.cpp:23 : Invasion Base Fleets: [2754]
2016-10-30 07:08:58.609375 [debug] AI : LoggingWrapper.cpp:23 : Securing Fleets: [] (currently FLEET_MISSION_MILITARY should be used instead of this Role)
2016-10-30 07:08:58.609375 [debug] AI : LoggingWrapper.cpp:23 : Exploration targets: None
Re: AI is tooooooo slow
Geoff the Medio wrote:But there's also a lot of unexplained (from just the log) 5 second jumps in the timestamps of log messages
Maybe that's due to these AI processed not getting enough CPU cycles for a while...? 32bit single core is really low spec after all, especially considering that even moderate to high spec machines have been reported to struggle with FO...EricF wrote:It is evidently too much for my single core 32 bit machine.
Re: AI is tooooooo slow
Memory usage of all processes is pretty consistent. All pretty low. Even when one of the FreeorionCA processes is using 75% of the CPU the memory usage is still not high. Even explorer.exe uses more memory than any of the FreeorionCA processes.Geoff the Medio wrote:Could you watch the memory usage of the AI processes over that time? Perhaps it increases each turn a similar amount, or suddenly jumps on the turn of the big slowdown?
That's pretty much the values they stay at.
FreeOrion.exe will shoot up to around 107,000K, but drop down again when AIs have finished.
This is after playing about 15 turns. Hasn't been too bad though. Averaging about 4 minutes a turn and no 10 minute ones.