9

In my HFT software I plan to use one core for stock index calculation. That would be simply while(true) loop without any delays which will calculate (sum and multiply) components as often as possible (so millions times per second) and I plan to do that 8 hours per day every day.

I was never before loading my computer to 100% full time every day regullary. May it be dangerous? Do processor has kind of "resource" (very big of course) after which it can stopped working?

ewwhite
  • 194,921
  • 91
  • 434
  • 799
Oleg Vazhnev
  • 539
  • 4
  • 13
  • 26
  • Easy bit of information. What type of hardware (make+model) do you plan to run your trading strategy on? – ewwhite Jul 05 '12 at 13:49
  • @ewwhite hp dl360p gen8 – Oleg Vazhnev Jul 05 '12 at 13:51
  • Yep, a great server. – ewwhite Jul 05 '12 at 14:05
  • 1
    Although, personally, I'd recommend architecting it in such a way as to allow clean shutdown. So, `while(active)`, not `while(true)` (with a 'shutdown' public method). – Clockwork-Muse Jul 05 '12 at 16:51
  • 2
    I've been doing this with even consumer-grade equipment for many years and never had a problem (distributed computing programs keeping my CPU at 100% non-stop). It sucks down more juice, and generates more heat, but as long as you've accounted for that, there's no danger. No moving parts in a CPU, so no risk or it wearing out or whatever. – HopelessN00b Jul 05 '12 at 18:09
  • @HopelessN00b IIRC, I remember reading an article that CPUs that run hot are more likely to have an eventual short form by the micro-wires migrating. I can't find a solid reference to this now though.. something to consider still – Earlz Jul 06 '12 at 00:42

3 Answers3

11

There's no danger (when using server-class hardware).

I've run hundreds of HFT systems where we'd designate a CPU core to run a spinlock thread (to reduce interrupts) or have strategies pegged to specific CPU cores for the duration of the trading day. This is what the CPUs were designed for. I can say that I've never had a processor fail in this context.

In your situation, are you using a proper server? Other factors to consider are cooling, redundant fans, power supplies, etc. But those are standard items for any production system.

ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • 3
    Italso works with non server hardware when properly put together. P24/7 is quite irrelevant here - anything that does not heat up long term will work. If you have a heat problem, it shows a LOT sooner than after one day ;) But you are right on server hardware, especially for example most have passive CPU coolers (air pressed through by fans in the CASE, but that is redundant and not a single fan on the CPU). – TomTom Jul 05 '12 at 13:45
  • Just thinking about the practical aspects of a financial trading system. I'd hate to see this running on a desktop for reasons outside of the CPU health. E.g. a power supply failing and taking you out of the market is a much bigger concern than the system overheating or the CPU failing. – ewwhite Jul 05 '12 at 13:49
  • Can be handled with redundant systems. The main reason some people go non-server CPU is that normally you can have a higher frequency there ;) Heck, there was once a company selling overclocked rack servers - with compressor cooling ;) Guess for whom ;) When you fight to be faster than the next one in the same rack, that may be what it takes. Not that I would ever do that - I am happy not going time critical. – TomTom Jul 05 '12 at 13:52
6

In general, no, though what you should be looking at is load, but temperatures. You might want to simulate the load (perhaps with superpi on windows, prime95 on linux and windows or some other stress test application, or your actual application) and run the process until the temperature stabilises -similar to what an overclocker would do.

You want this temperature to be under the maximum rated temperature for that processor -look up the datasheet for that. Then see if your cooling solution is adequate and presumably adjust it as needed. I can't suggest monitoring software, unfortunately without knowing an OS - the usual suspects such as nagios may work, but for a initial 'burn in', something like lmsensors or pcwizard may do for a single system.

Most modern processors will simply throttle down if they overheat - intel has a page on this. It would be horrible for your application if performance is critical, but its more likely the system will shut down or act strange rather than burn itself out. Thats a sign the processor is overtaxed, and bad things are happening - review your cooling choices in that case.

Journeyman Geek
  • 6,969
  • 3
  • 31
  • 49
5

Thousands of scientific clusters worldwide consider it a suboptimal (or bad) situation when there are cores that are not at 100% CPU load. Real servers with proper server grade hardware are designed for this.

Sven
  • 97,248
  • 13
  • 177
  • 225