CPU & Memory Usage [concerns]

For everything NOT server specific support. Do NOT ask for connectivity help here!.

Moderator: Moderators

Message
Author
kalansay
Human
Human
Posts: 39
Joined: 15 Apr 2008, 18:58
Noob?: Yes
Contact:

CPU & Memory Usage [concerns]

#1 Post by kalansay »

This is to help users who has concerns for CPU usage and RAM usage.

First, why is this a concern...
If you are only using a laptop as bot terminal, you don't want your laptop to be running at like 20% to 100% CPU usage in a 24/7 basis. It would really heat-up your system and you would want some cooling pads but they don't help that much.
If you are using a desktop computer, you would not want to always use a big percentage of your CPU. You might have a good cooling system but the fact that your processor is using a huge amount computing power is a big no. You only have a total of 100% and let's say that 7 bots would eat up 30-40% of your CPU usage, you would not want that while doing other stuffs.

Changing the SleepTime in your config.txt is working but your bots will suffer in terms of efficiency and performance.
I tried it, mine was originally set to 10000 and I changed it to 50000. It's like magic that the CPU usage of the bots are really down to 00% - 02% CPU usage per process.

What I did...
I am using wxstart.exe and guess what, it does not eat up CPU usage at all. It was only running at 00-01 in my system. My SleepTime at config.txt is set to 10000.
start.exe for me is eating a stable amount of 4-6% CPU usage each and that really hurts. Just by running 4 bots, your CPU usage will be at around 20-23%. And the SleepTime is also set to 10000.
Look at that, both set to SleepTime 10000 but wxstart almost uses none of your cpu usage.

I am not an expert about this and I really don't know the reason behind this.
But it works for me and might also work for you. I don't know if running wxstart (the one with the interface) will reduce the efficiency and performance of your bot but this CPU usage is super okay to me.

A concern for using wxstart.exe...
If you have a small RAM (your computer's memory card: ddr1 / ddr2 / ddr3), keep in mind that using wxstart need bigger resources in terms of memory.

In my system:
start.exe = around 60,000 K ~ 65,000 K
wxstart.exe = around 90,000 K ~ 95,000 K

As you can see (based on my system), wxstart needs 30K~35K more memory per process.
If you only have 1-2 GB RAM in your system, that would be somehow problematic for you if you want to run multiple bots.
But... we all know that memory modules (RAM) are cheap so just upgrade it so that you won't mind this anymore.

Why is memory a concern...
Let's say that you only have 4 GB RAM in your system and you are running around 10 bots.
You resolved the issue of high CPU usage by using wxstart.exe but it eats up more memory compared to start.exe.
(90,000 K ~ 95,000 K) multiplied by 10 will be 900,000 K ~ 950,000 K.
It means that the 10 bots that you are running uses 1 GB of your memory.
You have the remaining 3 GB.
Your computer's operating system, Windows XP/7/8 in this case, is using around 1 GB ~ 2 GB of your memory resource depending on the services that you are running and whether you are using a 32-bit or 64-bit operating system is also a factor for memory usage of your operating system.
Now, you only have 1 GB memory resource useable for other processes and this could be a problem if you are doing stuffs like running applications that needs quite a load of memory. If you are browsing the internet, an average browser nowadays eats up around 300,000 K memory just by running just one tab. Opening another tab would increase the memory usage of your browser.
Do the math and see for yourself what is left in your 4 GB RAM, almost none.



I hope that these informations would help you in understanding your concerns.
For your CPU Usage & Memory usage concerns...
http://forums.openkore.com/viewtopic.php?f=10&t=33261
Image

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: CPU & Memory Usage [concerns]

#2 Post by EternalHarvest »

CPU usage
I don't observe any drastic changes in CPU usage between console and Wx interfaces on my system.

Wx interface uses Wx timers instead of Time::HiRes::usleep, maybe there's some problems with usleep on Windows.
RAM usage
Wx interface will use more RAM due to a set of additional modules being required.

glennlevi
Plain Yogurt
Plain Yogurt
Posts: 58
Joined: 19 May 2011, 00:40
Noob?: Yes

Re: CPU & Memory Usage [concerns]

#3 Post by glennlevi »

I dont know if this helps, but it works for me...

First open all your kore bots, then in task manager, set all start.exe priority to low. It seems for me that after about 2-3 hours, the 55~58k Ram Usage would drop to about 22~25k. Also, setting it at a lower priority makes other running apps run faster, as your computer allocates more cpu power for those apps with normal priority. You can even try setting apps you really need to high priority.

Here is my experience. When I open 10+ bots then open firefox, my laptop gets laggy like hell. When I set all start.exe priority to low, it starts to get smooth, as if I have only 2 or 3 bots open.

You can also download an app called prio, which saves priority, so you dont have to set it everytime you run multiple bots.

Post Reply