Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dual core cpu
Message
From
11/04/2007 23:10:45
 
 
To
11/04/2007 17:33:00
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01214424
Message ID:
01214815
Views:
8
>>Depends how you call the tedious/queued part. If you call it via a DO or function call in Primary, it would still be running in the same thread (i.e. synchronous). It would need to be started separately through an OS/API call (i.e. asynchronous).
>
>That's why I mentioned the queue app, because it runs as a separate exe in all scenarios I saw so far.

A process will make use of other cores unless specifically restricted to run on a subset of available cores.
But threads ususally have the same ability. VFP code execution is single threaded - you need to branch out to COM via poolmanger examples or use Calvins code.
>
>>Laptops tend to have slow hard drives so if you speed test you might need to make sure you've got lots of free RAM and your data get cached.
>
>I wasn't concerned with speed that much - just wanted to know whether the load would be spread.

Yupp it should. But make sure the "load" mostly taxes the cpu, or you can have contention on already bottlenecked parts: 2 processes querying a table via phone line won't help<g>. In the very worst case you might actually slow down compared to processing singlethreaded if you tip caches already running near capacity over into thrashing. Happened on relatively memory starved machines on disk intensive routines - but is the exception and not the rule. I am sure both of you can visualize similar scenarios, even if I don't get into detail here.

>>A lot of work goes into modern OS schedulers which load balance automagically to the best of their ability - and which generally do a pretty good job. I think processor affinity can be specified, but I don't know how, or if it can be done through ShellExecute() - I think Thomas has some knowledge in this area.
>
>Well, let's hope he chimes in here.

There are WINAPI calls to get/set Process- and Threadaffinity. When I first used X2 cores the patch for high perf counters was not available, which gave my timing scenarios a nice random element <g> and I sometimes set the process affinity via the task manager manually. After the patch I did not bother to implement the API calls as my manual setting did not change overall performance markedly.

regards

thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform