All available processors of selenium node machines are not getting used in Selenium Grid - selenium-webdriver

I am implementing parallel testing system using Selenium Grid architecture.
I added couple of nodes where each of them have 4 available processors with a hub machine, which has 2 available processors. But after running the test suite, only 2 test cases are running in 2 different sessions in node machines. All the other machines and their processors are lying idle.
For example, I have 4 node machines where each have 4 processors. So, in total I have 16 available processors. But only 2 sessions are getting created and all the 14 processors are remaining idle.
I am using Selenium Grid 4.7.2.
All the hub and node machines are on Windows OS.
The command I have run in the hub machine is:
java -jar "C:\SeleniumGrid\selenium-server-4.7.2.jar" hub
The command I have run in the node machine is:
java -jar "C:\SeleniumGrid\selenium-server-4.7.2.jar" node --hub {hub-machine-url} --max-sessions 4
All the nodes have been connected with the hub successfully.
I have also set the hub on another machine, where available processors are 16. In that case, 16 test cases are running concurrently in various node machines.
My question is, why does the running test case's amount is depending on the hub machine's available processor?
Can someone please help me out? Please let me know if you need any additional information.

Related

Can a simple PC (windows 10) having TwinCAT XAR be used as a target in host computer having TwinCAT 3 XAE

I want to know if I can use a system(run time pc) with Windows 10 OS which has TwinCAT XAR installed in it as a remote system. In other words can I select it as a target? Do we need any extra settings to make it work or it will work just like any other hardware controller?
Yes, you can select a Windows 10 PC with TwinCAT XAR installed as a remote target, however the performance may not be the same as you would get with purchasing a known hardware configuration from Beckhoff.
As noted in the Beckhoff documentation:
For a reliable, optimized and performant realtime behavior, a
completely aligned system design (hardware, BIOS, OS, drivers,
realtime-runtime) is mandatory. Each single component of the control
system has to be checked and optimized for this type of application -
that is the one and only way for an optimal, reliable and performant
realtime behavior. Beckhoff IPCs are optimized in each detail for this
type of operation. There is no guarantee for proper, reliable realtime
behavior on third-party PCs.
To use any Windows PC as a remote target, you need to ensure that the XAR is installed and that the Windows firewall is open to ADS. See also routing through a firewall. Specifically, you should open port 48898 to incoming TCP traffic and port 48899 to incoming UDP traffic in the Windows firewall. After this, you should be able to create a route normally using the IP address of the target PC through the ADS router on your development system.
You may also want to isolate a CPU core on the target system and dedicate TwinCAT tasks to it to ensure more consistent realtime behavior.
Finally, you need to purchase a license for the PLC if you intend to use it for a purpose other than development. This requires the higher performance level >= P90 and a license dongle, see this note about TwinCAT 3 licenses for non-Beckhoff IPCs.

Why does one core execute more than its share of instructions?

I have a C program (graphics benchamrk) that runs on a MIPS processor simulator(I'm looking to graph some performance characteristics). The processor has 8 cores but it seems like core 0 is executing more than its fair share of instructions. The benchmark is multithreaded with the work exactly distributed between the threads. Why could it be that core 0 happens to run about between 1/4 and half the instructions even though it is multithreaded on a 8 core processor?
What are some possible reasons this could be happening?
Most application workloads involve some number of system calls, which could block (e.g. for I/O). It's likely that your threads spend some amount of time blocked, and the scheduler simply runs them on the first available core. In an extreme case, if you have N threads but each is able to do work only 1/N of the time, a single core is sufficient to service the entire workload.
You could use pthread_setaffinity_np to assign each thread to a specific core, then see what happens.
You did not mention which OS you are using.
However, most of the code in most OSs is still written for a single core CPU.
Therefore, the OS will not try to evenly distribute the processes over the array of cores.
When there are multiple cores available, most OSs start a process on the first core that is available (and a blocked process leaves the related core available.)
As an example, on my system (a 4 core amd-64) running ubuntu linux 14.04, the CPUs are usually less than 1 percent busy, So everything could run on a single core.
There must be lots of applications running like videos and background long running applications, with several windows open to show much real activity on other than the first core.

Using clone on multicore machine

I am creating a number of threads equal to the number of cores of my machine using clone().
Can I be sure that each thread created will be run on a different core ,simultaneously
?
thanks

Multi-core programming

I have a 6-core setup (intel xeon) with hyperthreading disabled running on Ubuntu.
I work on a software that increases the number of pthreads launched. When I increase my number of threads from say 3 to 6, I find that my CPU utilization by running the top command always remains around 290%. I am assuming that this means 3 out of 6 cores are being utilized. This is pretty confusing as I would expect all the cores to be utilized. I have checked the program's core affinity and it shows that its affine to all cores. Can anyone provide me with some hints or suggestions on what I might be doing wrong?
Thanks!

How to know if x264 uses multiple processors Windows

I have Linphone open source application that uses x264 encoder. By default it runs on one thread:
x264_param_t *params= .....
params->i_threads=1;
I added ability to use all processors:
long num_cpu=1;
SYSTEM_INFO sysinfo;
GetSystemInfo( &sysinfo );
num_cpu = sysinfo.dwNumberOfProcessors;
params->i_threads=num_cpu;
The question is how do I know that during video streaming x264 runs on (in my case) 4 processors?
Because from Task Manager -> Performance -> CPU usage history doesn't clear.
I use windows 7
Thanks,
There are three easy to see indications that encoding leverages multiple cores:
Encoding runs faster
Per core CPU load indicates simultaneous load on several cores/processors
Per thread CPU load of your application shows relevant load on multiple threads
Also, you can use processor affinity mask (programmatically, and via Task Manager) to limit the application to single CPU. If x264 is using multiple processors, setting the mask will seriously affect application performance.
In windows task manager, be sure to select View -> CPU History -> One Graph Per CPU. If it still does not look like all processor cores are running at full speed, then possibly some resource is starving the encoding threads, and there's a bottleneck feeding data into the encoder.

Resources