Date: Wed, 20 Feb 2019 17:35:21 +0000 From: "Farhan Khan" <farhan@farhan.codes> To: freebsd-hackers@freebsd.org Subject: Optimize execution of processes by CPU core Message-ID: <2fcd9aee092730e11880c3ae88de4898@farhan.codes>
next in thread | raw e-mail | index | archive | help
Hi all,=0A=0AI am trying to optimize the execution of a CPU-intensive wor= kload where I am running multiple instances of a program. The moment the = program ends (expected behavior), the calling shell script verifies the r= esults and if its good it reruns the program. The machines I am running t= his on have 8 cores, but ps reports that some of the processes frequently= run on the same CPU, so I suspect I am not getting optimized performance= . If possible, and if most efficient, I would like to run each process on= its own CPU core.=0A=0AAre there any best practices on how to run someth= ing like this? I understand cpuset can perform some functionality around = this, but I do not understand the tooling (The man page speaks of a CPU s= et?) Would I do something like "cpuset -c -l 0 program arg1 arg2 arg3" in= one script, and then "cpuset -c -l 1 program arg1 arg2 arg3" in the next= up to 7?=0A=0AObviously it would be best to re-write the program to hand= le multiple threads in in an optimized way, but that would take more time= than the optimization would likely save.=0A=0AThanks,=0A=0A---=0AFarhan = Khan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2fcd9aee092730e11880c3ae88de4898>