PDA

View Full Version : Dual Core help



j.baker
07-23-2005, 06:13 PM
Hi,

I have an Athlon 64 X2 4400, and I was wondering if I need to do anything to make use of all of my available processor power?

Bok
07-23-2005, 06:46 PM
If you are running linux, just have two seperate directories running Sob. If it's windows I believe you'll have to install the service to utilise both procs.

Bok

j.baker
07-23-2005, 06:49 PM
I am running Windows Pro XP SP2, but I do not want to run SB as a service, as I run games and large application, so I need to start the program manually.

Bok
07-23-2005, 07:12 PM
Well, it only takes 'unused' cycles anyway so it would get out of the way automatically of any gaming etc..

But if you do want to run it manually, I seem to recall some way of running two instances manually on windows but I can't quite remember. I'm sure someone will be a long fairly soon to answer that.

Bok

Theadalus
07-24-2005, 09:53 AM
You need to start the 2 instances as seperate instances with their own test, and not as 2 instances crunching the same test. To do this you need to start the instance with some parameters (like the service does?) and i don't believe these parameters are public info :(

So i believe using the service (which you can start/stop manually) will be the only solution to start multiple instances :confused:

vjs
07-24-2005, 12:14 PM
Your best bet with a dual core is to run one instance of the program with out start then run one instance of the SoB-sieve program.

Check out the sieve section of this forum.

ShoeLace
07-25-2005, 03:47 AM
it is certainly VERY easy to start 2 instances of the seiveing program manually..

install in 2 different dirs and you almost done..

j.baker
07-25-2005, 04:04 AM
I have installed it twice SB and SB2, but they appears to be running the same block. What next?

j.baker
07-25-2005, 05:15 PM
I have setup the service with -o2

I will monitor this to see if it is an issue.

BTW, 2.15M and 1.55M cEM/s on Athlon 64 X2 4400 with 2GB PC3200 memory

Ken_g6[TA]
07-25-2005, 08:05 PM
It's hard to start two SB instances manually because they use some of the same registry keys to store K and N, among other things. The service installer appears to start one instance, then rearrange the registry, then start another instance. I think you can do this manually, but it's not easy. I can post the relevant keys if anyone's interested and no one minds.

Nago
08-29-2005, 01:44 AM
On a somewhat related note, I'm a little bit lost at the most efficient way to make use of a Pentium 4 Processor using Hyperthreading- What would be the best way to configure the service? There seem to be a lot of options available, but I'm not very keen on the differences between Logical CPUS and Physical CPUS, and I'm not sure which option would suit me best.

Mystwalker
08-29-2005, 04:24 AM
With hyperthreading, you have 2 logical, but only 1 physical CPU.
According to the manual, I'd say that "sobsvc -o" or "sobsvc -o2" would be best.

As an alternative, you could run one SoB client and one sieving client instance. This would improve hyperthreading use.

Theadalus
08-29-2005, 10:00 AM
My experience with HT machines is that 1 client has a higher output (cEMs/sec) than 2 clients together, not much but still...

On HT machines the service will automatic launch 2 clients, to use 1 client you need to set the -p option:

sobsvc -p:1

or just launch sb.exe without using the service ;)

hoos
09-03-2005, 07:53 AM
there are several ways to configure sb using multiple processors and many of them are listed in the read-me files that are associated with your os

Chuck
09-09-2005, 06:54 AM
For those running Windows,

It's important to set the affinity BEFORE invoking any legacy programs that are not dual cpu, dual core, or dual-dual.

In windows, once it recognizes you have more than one cpu, you will have the affinity option in the task manager. This is the manual way to set it. The whole purpose is to gain max efficiency for programs by preventing windows from moving it back & forth between processors...

The AMD dual cores each have seperate caches (just like a regular dual cpu machine).

My manual trick in windows if using a command line program is

a) start task manager and push it to one side.

b) start a cmd.exe window.

c) go over to the task manager, right click and put the CMD.EXE on the
desired cpu (either core, cpu, or core/cpu if you have dual-dual)
typically the highest numbered CPU and work toward zero.

d) from that cmd window... "cd" to where you need to be and start your
program. (this is instance 1)

e) now go back to task manager, change the affinity of the CMD.EXE to the
next core/cpu, CD as required, type the new command line as required
and start the next instance.

f) repeat this process as required.



What is important to remember is that most multi-processor motherboards allocate memory from their LOCAL cpu bank first where performance is fastest... You don't want to allocate 250mb from one processor's memory bank and then run on the other processor in a dual processor system as you would spend the whole time waiting for data across the hypertransport.

Multi-core cpus allocate from the same bank, so switching affinity within the individual cpu is nothing more than a cache flush and reload on the new core because you already have the memory allocated in that 'bank' of that same physical processor. It's switching across actuall physical processors' memory banks that will nail you.

The steps above perform this by manual task fork() (starting from the command line), and the affinity mask change (exec() equiv in the Task Manager).





If you have a friend who can write a little windows program using cygwin (mingw compiler), you can create the linux equivalent of 'taskset'. Taskset is a standard linux tool for fork()ing a new process, setting the affinity, and then 'exec()ing' the desired program based on the "-c" (cpu) command line option. This works because affinity is preserved across the exec() function (which will actually replace the fork() that started taskset). The only trick is to convert cpu id # to the 'allowed' cpu bit mask.


taskset looks like this for running the proth_sieve_sse2 in linux in
my shell script to launch four instances (cpu0 -> cpu3). Please understand that I have previously setup these directories (cpu0 -> 3) with different P ranges to sieve (which is simply a start, specify minp and maxp, run one SobStatus, then exit)

#/bin/sh

cd /blah/blah/cpu0
taskset -c 0 proth_sieve_sse2 {proth command options here}

cd ../cpu1
taskset -c 1 proth_sieve_sse2 {proth command options here}

cd ../cpu2
taskset -c 2 proth_sieve_sse2 {proth command options here}

cd ../cpu3
taskset -c 3 proth_sieve_sse2 {proth command options here}



this is how I divide a sieve range across multiple cpus.

I'm sure someone could easily write, if not already done by cygwin, the windows equivalent of taskset.

If you have multiple machines and setup .rhosts and have rshd started, you can extend this to multple boxen as well.

Hope this makes sense.. if I am too vague in any area, please don't hesitate to ask. I work on multi-cpu (SMP, ASMP, and actual multi-host) for a living. We are switching from Xeons to A64 and actual Opteron (940 pin) and integrating all that with the Numa architecture of the SGI's we have. They all run very nicely together. There are now 4 AMD cores in a box, 4 boxes to a cluster, and 9 clusters to a 'set', all diskless. The SGI makes it a little simpler to do because the cpus are already numalinked as one big SMP box, but is MUCH more costly... all depends on what the customer buys.

Chuck

Nago
09-16-2005, 09:47 AM
In running sobsvc -i just once, it seems to launch just one client on this PC, with hyperthreading. Running SOBSVC -o sets the affinity type to running one client for both processors, and sobsvc -o2 sets one each- at least, this is my current experience with it.

I am finding that using -o, while using both processors, is only producing half as much as using -o2. Would setting the affinity type manually increase productivity with one client, (to the point of it being beneficial over two processors) or should I just stick with -o2?


Second question, is that I have a mobile pentium 4 with hyperthreading that runs at about 3.33ghz that is currently running the sob service using the -o setting, which apparently uses both processors, but the max output is a rather dismal 500k, as opposed to my desktop PC, with a 3.2GHz Pentium 4w/HT pumps out roughly 2.5-2.8m- I'd expect the laptop to perform a little less brilliantly, due to the nature of laptop parts and such, but not at a rate as low as that. I'd set it to -o2, but that seems to overheat the unit and doesn't produce that much of a performance increase anyway.

Suggestions?


(edit: Thank you all for your help!)