bug-parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Default behavior using only 1 thread


From: SMAGGHE Clément
Subject: Default behavior using only 1 thread
Date: Mon, 01 Jan 2024 02:14:50 +0000
User-agent: Vivaldi Mail/6.5.3206.48

Hello,

Lately (I don't know what changed - an update, a wrong manipulation by me, 
...), for now a few days, parallel does not use more than one thread by default.
The default value for `-j` is 100% and as the man page says (for the flag `-j`):
>Run up to num jobs in parallel. Default is 100%.
>E.g. 100% means one job per CPU thread on each machine.

Here is an example of output and problem I have (after the version of parallel):
```sh

$ parallel --version
GNU parallel 20231222
Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software
Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
GNU parallel comes with no warranty.

$ time parallel -j 100% sleep {} \; echo {%} ::: 1 1 1 1
1
1
1
1

real    0m4,373s
user    0m0,093s
sys     0m0,055s
$ time parallel -j 16 sleep {} \; echo {%} ::: 1 1 1 1
1
2
3
4

real    0m1,095s
user    0m0,101s
sys     0m0,048s
$ nproc
16
```
We can see that the default behavior takes 4 seconds to complete, while setting 
properly the `-j` flag it only takes one seconds (which should be the behavior 
of `-j 100%`).
Everything worked well before (a bit more than a week ago).

Since I had that issue, I removed the `~/.parallel` folder, without any change 
(strangely, the citation does not appear after the deletion of the folder, but 
I can't find any other place where parallel stores config files).

GNU parallel is up to date, I'm on Arch Linux 6.6.8-arch1-1 x86-64, with an 
Intel i7-10870H (8 cores, 16 "virtual" cores - hyperthreading).
Using command with more CPU load than simple `echo` and `sleep`, I can see that 
`-j 16` does use ~1550% of CPU resources (so it can use all the threads of my 
CPU).

Yours sincerely (and a happy new year),
SMAGGHE Clément.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]