Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Multithreading memory scans

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
ulysse31
Master Cheater
Reputation: 2

Joined: 19 Mar 2015
Posts: 324
Location: Paris

PostPosted: Tue Nov 29, 2016 1:07 pm    Post subject: Multithreading memory scans Reply with quote

So I did some research on how memory scanners do their work and I came across Crysearch which seems to be the most different than CE in terms of searching variables :
It uses multithreading and saves reslults in I/O files.

Using unknown initial value and fastscan disabled (4 bytes length variable) I decided to compare CE and Crysearch on a 700 Mo program : Skype.exe
While CE doesn't save results to disk, the CE.exe program size increased significantly as expected, no thread were created (monitoring from process explorer.exe) and seeminly the cpu wasn't used above 1%. Scans over in seconds.

Crysearch would last around 3 times longer, possibly go to 20% CPU, create 1/2 threads (i expected many more) and would not see its virtual space impected, as expected considering results are saved to disk.

After some documentation I'd like 2 asumptions to be confirmed :
1/ Considering there is no I/O (and no operations subject to waiting idle) inside the scan, on a CPU with X cores, making the scan use more than X threads will not increase performance, true ?

2/However if part of the scanned memory has been paged to disk by the OS, scanning threads could potentially wait for disk to provide data which would mean that the more threads, the better the performance ?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Tue Nov 29, 2016 1:46 pm    Post subject: Reply with quote

There are configurations for Cheat Engine that you would need to look into if you are going to compare the two more effectively. Cheat Engine does store its search results to disk for faster response times. You can find that data, by default, inside of the %temp% folder on your system under 'Cheat Engine'.

You can also configure this output location in CE's settings:
Settings -> Scan Settings

You can also alter the scanner a bit inside of these settings to change what it will and won't include during scans.

Under the 'Extra' settings the kernel function options can also affect scan times.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25807
Location: The netherlands

PostPosted: Tue Nov 29, 2016 1:55 pm    Post subject: Reply with quote

unless you compiled ce yourself with the 'nomt' define, the scans are multithreaded. (it spawns threads for each cpu)

1: right, if there is no blocking operation more than X won't give much improvement and may even decrease speed

2: kinda, but don't forget that it can cause other memory to get paged out.


(if you compile ce with the 'lowmemusage' define it will also write the results to disk)

_________________
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
View user's profile Send private message MSN Messenger
ulysse31
Master Cheater
Reputation: 2

Joined: 19 Mar 2015
Posts: 324
Location: Paris

PostPosted: Tue Nov 29, 2016 3:44 pm    Post subject: Reply with quote

Great, thank you both
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites