 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
crtzrms Newbie cheater
Reputation: 0
Joined: 26 Apr 2020 Posts: 13
|
Posted: Sun May 03, 2020 7:41 pm Post subject: Performance tweaks for ultimap 2 |
|
|
I've been using the first version of ultimap to write some really cool hacks this week but i moved on to a game that becomes pretty much unplayable using it, so i decided to give ultimap 2 another try. Turns out, performance while capturing events is MUCH better, but filtering process is obnoxiously slower, so i was looking for ways to improve performance, but i also have some concerns:
1- Does ultimap 2 uses any file as buffer? If so, where is this file? My concern is that my OS is on a SSD and if CE uses TEMP or any other system folder, it might kill my SSD real soon and that would suck.
2- I have 16GB RAM, but so far i've been using 16384KB as buffer per CPU; should i crank this up to hit my memory limits? I'm running on an I7 so i think it could be reasonable to have a buffer up to 1.3GB/core (total 10GB buffer) but since i don't know where CE is storing this information, i've been hesitant to mess with this configuration for now.
3- So far i've been using usermode. I'm not entirely sure if kernelmode would improve performance.
4- "Do not trigger interrupts when full" option seems to crash cheat engine and does not prevent BSOD sometimes; CE drivers are properly loaded tho, so i'm not entirely sure why this is happening.
5- I've been using "Process data while recording" option, and so far it seems to let me play the game with minor performance impact, but then again, since i don't know if CE will try to save a file somewhere on the SSD if i change this option, i didn't even try yet; If it uses my RAM only, it should provide a nice boost in itself.
6- Adding ranges doesn't seem to help all that much with performance (and usually gives me a BSOD), should i be more restrictive about the ranges i put?
7- Filters (Even when there are only 30.000 points being covered) take a whole eternity to process for some reason, there could be any specific configuration i'm missing?
As a final note, i've been using "Pause target while processing" because it sounds optimal, but leaving it off doesn't seem to have any major impact on performance. Another important note is that im working on a game running under an emulator (PCSX2).
Thanks in advance.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25832 Location: The netherlands
|
Posted: Mon May 04, 2020 1:46 am Post subject: |
|
|
1: If you use the default options the radiobutton "Process data later" will be set, and the folder will be set to d:\lotsofspace
So if you didn't change it, the results will be in d:\lotsofspace
2: The buffersize will only affect the speed inside the game itself as there will be less pauses while saving to disk, but the processing will still take a while
3: It won't. By not checking kernelmode you are not watching kernelmode code from being executed, which wouldn't contain anything useful anyhow
4: That only has an effect when using ranges. If empty not sure what will happen.
5: Just RAM
6: Did you let it load DBVM or did you load DBVM first? If not, you will BSOD yes. Also, what Mainboard do you use and are you using 7.1?
But since you're mentioning an emulator, ranges won't help you as the emulator likely JIT's the code
7: The filters have to parse the profiling stream and then go through it with the disassembler. In that way it is a bit slow yes
Also, what BSOD are you getting. A memorydump may help
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
crtzrms Newbie cheater
Reputation: 0
Joined: 26 Apr 2020 Posts: 13
|
Posted: Mon May 04, 2020 9:09 am Post subject: |
|
|
| Dark Byte wrote: | 1: If you use the default options the radiobutton "Process data later" will be set, and the folder will be set to d:\lotsofspace -
So if you didn't change it, the results will be in d:\lotsofspace
2: The buffersize will only affect the speed inside the game itself as there will be less pauses while saving to disk, but the processing will still take a while
3: It won't. By not checking kernelmode you are not watching kernelmode code from being executed, which wouldn't contain anything useful anyhow
4: That only has an effect when using ranges. If empty not sure what will happen.
5: Just RAM
6: Did you let it load DBVM or did you load DBVM first? If not, you will BSOD yes. Also, what Mainboard do you use and are you using 7.1?
But since you're mentioning an emulator, ranges won't help you as the emulator likely JIT's the code
7: The filters have to parse the profiling stream and then go through it with the disassembler. In that way it is a bit slow yes
Also, what BSOD are you getting. A memorydump may help |
2- 1.3GB of ram per core isnt enough to keep the whole process in RAM only?
6- I'm using 7.1; When i got the bsod, i (guess) let it load DBVM itself, tried to set a range, checked the option to not trigger the interrupt and when i started capturing the events, CE hanged. Tried closing CE, closed the game, opened a new instance of both, and tried working without ranges, then it crashed with PROFILER_CONFIGURATION_ILLEGAL. I guess maybe since CE hanged it might still be running in background then and eventually let to the BSOD, i'm not entirely sure. Worth mentioning that since i've been running without ranges at all and didn't have issues with BSOD, but the 2 times i tried it out it hanged on me.
I can pinpoint the area of memory the emulator is using to run the game code, tracking some game variables and seeing the memory allocations give me an idea where to look for.
Edit:
Restarted the computer.
Loaded the driver manually.
Opened the game.
Set the options like this imgur(dot)com/a/1nYnTX7
Started the capture
Swiftly went into the game, performed the action i want to trace and filtered with "Code has been executed" (Swiftly as in less than 20 seconds of execution within the game)
Filtering took a solid 10 minutes
Edit 2:
Did the same as the test above but with default buffer size per core and set a small range (Only the main module), 10 seconds of recorded gameplay still takes 10+ minutes to analyze. There must be something wrong.
Might be worth mentioning i set the affinity of the game to only 2 cores so it has less cores to analyze overall.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25832 Location: The netherlands
|
Posted: Thu May 07, 2020 2:59 am Post subject: |
|
|
2:
It's not the process, the cpu will generate a log entry for every jump and and writes it to memory. Once that memory is full it has to be written to disk. And during that time the process will be suspended
6:
Freeze is DBVM likely not supported on your system
PROFILER_CONFIGURATION_ILLEGAL is using ranges but DBVM not loaded
but yeah, not useful for your situation right now
---
You're not wrong, it's just not that fast. Not sure if the affinity has an effect. Every CPU generates it's own log, but because it's a continuous stream only one thread can process the cpu log generated. So theoretically having more cores log should be faster(more threads processing the data), BUT windows sometimes assigns some processes to a specific cpu core itself, so most of the code might be executed on one core anyhow generating only a log for one cpu
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
crtzrms Newbie cheater
Reputation: 0
Joined: 26 Apr 2020 Posts: 13
|
Posted: Thu May 07, 2020 2:17 pm Post subject: |
|
|
| Dark Byte wrote: | 2:
It's not the process, the cpu will generate a log entry for every jump and and writes it to memory. Once that memory is full it has to be written to disk. And during that time the process will be suspended
6:
Freeze is DBVM likely not supported on your system
PROFILER_CONFIGURATION_ILLEGAL is using ranges but DBVM not loaded
but yeah, not useful for your situation right now
---
You're not wrong, it's just not that fast. Not sure if the affinity has an effect. Every CPU generates it's own log, but because it's a continuous stream only one thread can process the cpu log generated. So theoretically having more cores log should be faster(more threads processing the data), BUT windows sometimes assigns some processes to a specific cpu core itself, so most of the code might be executed on one core anyhow generating only a log for one cpu |
Whenever i set an affinity, if i check the files, it only generates files for the cores i selected, which works as intended but processing still seems to take the same amount of time to finish, which is kinda weird.
Has any1 done a performance analysis of ultimap2 functions? It seems the main problem is within the processing itself, not in the filtering; I read some of the code but i must admit that CE's source is simply huge and by just glancing at it is kinda hard to tell how things work exactly but you mentioned it first has to process the profiling stream and then go thru with the disassembler, is this task being done @ TUltimap2Worker.processData? (It was the only place in ultimap2's unit i could find a reference to TDisassembler)
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25832 Location: The netherlands
|
Posted: Thu May 07, 2020 2:27 pm Post subject: |
|
|
In processdata yes, but the heavy lifting is mostly done in the intel process trace decoder library (itp dll)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
crtzrms Newbie cheater
Reputation: 0
Joined: 26 Apr 2020 Posts: 13
|
Posted: Thu May 07, 2020 4:31 pm Post subject: |
|
|
Do you think its a pointless effort to try to improve the code? Is the dll key to it all?
Whenever i have time ill put lazarus here and try to see if i can work something out, if possible.
|
|
| Back to top |
|
 |
|
|
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 You cannot attach files in this forum You can download files in this forum
|
|