Page 1 of 1

Multiprocessor usage....

Posted: Tue Jul 29, 2003 11:56 pm
by cybernerd
What is the most effective way to take advantage of multiprocessor stuff. I remove as many programs from memory as possible. EQ seems to always assign itself to CPU 0 and you can't change it, but most others you can change the processor that any thread can run on... So what is the best choices? I want to run macros as fast as possible =P. Any suggestions on using EQwindows and changing the priority? I usually run my trader on a single processor computer at below average so it uses only about 50% resources instead of 99%. Is there anything I can change in the compiler to make it faster? I've tried changing a few settings but you can't enable optimizations =(.

-The Nerd :lol:

Posted: Wed Jul 30, 2003 10:18 pm
by MegaHertz
Use EQW it takes advantage of multi procs. think it only uses one proc per instance though. Threading has to be done at the program level if it does not have threading programmed in then it wont take advantage of multi procs. Blame 989 (I belive they are thoe ones that wrote the engine anyway)

Posted: Thu Jul 31, 2003 6:19 am
by cybernerd
Hmm. That's what I thought, but I wasn't sure. Thx Megahertz for reinforcing that. And you can only run 1 instance on 1 processor. That's one of the fact of life. Does anyone understand how MQ injects itself into EQ? Does it add code to EQ and become a part of the EQ thread, or does it change EQ code to point to MQ code and they are distinct threads, and if they are distinct threads, is it even possible to run them on 2 separate processors. I've tried to run macros that lock out the computer to see what kind of processing is needed, and aside from system resources and EQ, nothing ever went above 1%. Anyone got any macros that will take up alot of processing power?

-The Nerd

Posted: Thu Jul 31, 2003 6:21 pm
by Valerian
sure, here's one...

Code: Select all

#turbo 5000
Sub Main
   :Loop
   /goto :Loop
/return
*shrug* should pretty much almost lock up EQ and use up all of a processor doing it.

Posted: Fri Aug 01, 2003 10:32 pm
by cybernerd
Well, it didn't do anything for processor usage... but my framerate dropped to 0.4 frames/second.. HEHE! i am smooth like that! eqgame.exe was the only program that used any resources.. and it just sat at 99% the whole time. No effect from the macroquest.exe program...

-The Nerd

Posted: Fri Aug 01, 2003 10:50 pm
by dont_know_at_all
Uh, are you sure that you have a multiprocessor system?

Posted: Fri Aug 01, 2003 10:52 pm
by Valerian
uh, that's because macroquest just hangs out to inject the DLL into everything that loads... once the DLL is loaded into EQ, it's part of eqgame's process.

Posted: Fri Aug 01, 2003 11:01 pm
by dont_know_at_all
Can a process claim reverse affinity?

"No, I don't want to run on that processor!"

I find it hard to believe that a spinning macro would not budge the other processor usage. I can see where it could difficult to spread a single thread over two processors but eq is not single threaded. Even if it was, there is enough I/O and other kernel junk that would be pushed on the other processor.

Does eqgame just run on one processor when another is available?

Posted: Sat Aug 02, 2003 11:37 am
by cybernerd
I have 4 processors. Some people think that if you have 4 2.8Ghz chips that you run at 4x2.8, or about 11.2Ghz. Trust me, I wish it was like that! Instead you have 4 CPus that run at 2.8 Ghz and each one does it's own processing at 2.8 Ghz. The way that threads are written, you cannot run 1 program on multiple CPUs. The code for a particular program is only processed by 1 CPU at any given time. You can change which CPU is actually used, default is to use CPUs 0 to 4. BUT, by changing the CPU from 0 to 1, it'll stop executing code on CPU 0 and begin on CPU 1. But only 1 CPU can be used for any thread. You change it by going to task manager, click on processes, right click on a process, and choose set affinity. The default is all 4. Now, having all 4 checked doesn't mean it will use all 4, it means it will use ONE of those 4. The OS decides what programs will run on what processors. The OS tries to distribute the load evenly among all 4 processors. So, 'eqgame.exe' uses 100% of CPU 0(or whichever one it end up with) and everything else runs on the other 3 processors. In the real scheme of things, you use 100% of 1 CPU, but only 25% of the computer as a whole. Only program running is EQ, and NAV auto-protect. MQ is too, but it's always 0%.

Image

Guess which CPU uses EQ! You guessed it! #3(remember, the first one is actually 0!)

So you ask, WHY on earth spend all the extra money on a 4 processor computer when you can't even use all 4 for games and such! The bottom line is simple. Multitasking. When I surf the net, or write DVDs, or do a virusscan, or do searches on my 1TB server, or defrag my harddrive, EQ runs smooth as silk. In fact, i've surfed the net, written DVDs, done viruscans and defragged my computer all at the same time. And EQ doesn't flinch a bit! Hooray for 15k SCSI hard drives! Each program uses the other processors. Less processing is spent on CPU 0 which runs EQ(or whichever one is randomly chosen) and makes everything else go faster!

The only BAD thing, and I don't know how they do it, or if it's a DirectX thing, but when EQ loads it takes a particular CPU, and you cannot change it. I really don't know why, maybe their poor coding schemes, im not sure.

Now I have heard hearsay that programs can be written to use multiple processors at the same time, and that it might be limited to linux(some say yes and some say no). The honest to goodness I know for sure with the average program is 1 thread=1CPU. If it's not written to use multiple processors there's nothing you can do.

My biggest problem is that NOBODY I know besides me owns a computer with several processors. In fact I had to buy a special XEON power supply to support all the load of these bad boys, I had to buy a special case, add as many fans as possible, add more fans via VERY artistic ways, and such to keep the thing at a good level of heat. Last winter I heated up my apartment by turning the computer on. HEHE! Just added a geforce fx 5900 ultra 256MB and now it's even hotter! and I'm about to add 2 more 15k harddrives, and those things get HOT! Yes, I have heat issues, and I cannot use water cooling because there is no water cooling system made to remove the BTU load I make with all my crap. HEHE! If any developers live in the Virginia area and would like to see this bad boy in action I'd be more than happy to show it off. Just send me a PM with your phone and real name. I'll call you when I get the PM. =) I know that when I compile MQ it goes quite fast since VS.net uses multiple programs and threads, they all get scattered all over the CPUs and loaded up.

DKAA, I definitely have 4 processors, I upgraded all of them yesterday. I built this computer at the cost of over $6000. It's got the fastest everything in it. And that's the way I like it!

Since MQ injects codes into eqgame.exe thread, im stuck with using just 1 processor. I was hoping if I could get the macro code to run on 1 CPU and EQ on the other it might run faster. But I guess im screwed since SONY will probably never support multiple processors...

-The Nerd

wow

Posted: Wed Aug 20, 2003 5:45 am
by Consilium
My friedn you are the nerd. You have some nice toys. I am running a multiprocessing machine with 2 ghz ram but the processors are only 750mhz so my 2.4ghz machine with 1gig of ram actually seems to outperform it. WIth the cost and the difference of performance its almost not worth it to multiprocess. Machines are cheap now if space isnt an issue it seems better to just buy more machines.

Posted: Fri Aug 22, 2003 2:39 pm
by Ecchi_User
Cybernerd earned his name :lol:

What he's saying is 100% true. I'm not as spoiled as him *hehehe* so I only have dual 2.4s.

There are a few games that supports multiple cpus (SMP).

Short list http://www.geocities.com/boo085/SMP_Games_List.html.

Here's a blurb about SWG tho...
11.16 Will the game take advantage of my system's dual processor configuration?

SWG takes advantage of dual-processor machines. However, the game will always be playable on single processor machines. Also, keep in mind that the game simulation is actually run on our servers, so users with dual processor boxes will not have any fundamental game play advantages.

...

11.18 Will SWG take advantage of systems equipped with dual processors?

The SWG client, unlike most games, is actually multithreaded. The second thread is used for the fractal terrain generation. So dual processors will provide a notable boost to game performance.
Also supposely DAOC now supports SMP.

I dont know how accurate all this information is... as I do not play ether of these game, just providing alittle info. Hopefully, the list of good games supporting SMP keeps on growing.