Skip to content

Is -j$(nproc) minus one possible?

So I use a Windows vm with a passed through GPU a lot as it's the best way for me to game on linux. In my /etc/makepkg.conf file I have the MAKEFLAGS value to set -j$(nproc) and the reason for this is that I have it setup so that if I'm not running the VM software packages from the AUR compile with all my available threads but when I run a vm I use dynamic isolation to split my CPU threads.

​

Anyways does anyone know if it's possible to set up a nproc minus one setup? I would like to have 1 guest thread left over so I can do stuff like watch youtube while software compiles without stuttering. if so how would I go about making that happen?

Thanks.

3 points6 comments
Open on Reddit
About this post
Posted
Archived
Score
3 · 100% up
Kind
Text
ID
pxfoex

Author

25
posts
222
comments
3
media
View profile

6 comments

Yes, e.g.:

echo $(( $(nproc) - 1 ))
8 points

So I tried to add this to my /etc/makepkg.conf file and it didn't seem to work.

​

Here's what I put.

MAKEFLAGS="-j$(( $(nproc) - 1 ))"

I'm not sure if this is correct or not.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.