리눅스의 시간동기화와 HyperThreading

1.
지난 8월 리눅스 기반의 트레이딩시스템에서 시간동기화를 어떻게 해야 하는지를 다루었습니다.

트레이딩시스템을 위한 시간 동기화

이 때 STAC에서 발표한 자료 때문에 Symmetricom에 메일을 보냈다고 했었습니다. 이후 아무런 소식이 없었는데 어제 HFT Review가 white Paper를 받으라고 메일을 보냈네요. 지난 번 글에서 자세히 소개하지 못한 내용을 글로써 자세히 정리하고 있습니다.

2.
한국알고리즘트레이딩포럼은 LinkedIn에 둥지를 만들었습니다. 덕분에 Linkedin을 통해 여러 모임에 가입을 했습니다. 그중 Real Time Linux and Highly-Optimized Linux OS Kernel Technologies에 참고할 질문이 올라왔습니다. Linux Server 살 때 제조사들이 제공하는 Low Latency 설정을 위한 문서가 있습니다. 권고는 항상 HyperThreading을 Disable로 하라고 합니다. HFT를 위한 환경설정을 위해 어떻게 하면 좋은지를 물어보고 있습니다.

Enable Hyperthreading or not?

의견중 일부입니다. 데이타의 I/O와 CPU Core의 Switching latency를 고려하여 의사결정을 하라고 합니다. KRX가 제공하는 시세의 초당건수를 고려할 때 국내트레이더의 대부분은 HyperThread를 Diable을 해놓는 것이 맞을 듯 합니다.

Depends on your application on whether HT is worth it.

If you’re sharing data between threads, and the threads go idle waiting for each other, then HT may improve your performance. The cost of hardware-assisted thread switching may be lower than the cost moving data between cores.

If you’re not moving high volumes of (disjoint) data, and/or if your threads are always active, then non-HT could have higher performance.

Another consideration is whether you’re using NUMA or SMP. NUMA memory access can be much faster.

 

In general HT increases latency as threads contend for resources on the same core. However the usual caveats apply, and so you should test your application to find out if disabling HT makes sense for your case.

Leave a Comment

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.