You are not logged in.

#1 2010-12-20 15:04:15

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Arch programs from repos and multithread support

Support of how many CPU cores/threads maintainers compile programs with? Programs which are available from Arch repositories.

Offline

#2 2010-12-20 15:18:42

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: Arch programs from repos and multithread support

As far as I know the kernel is compiled with a maximum of 16 cores

Offline

#3 2010-12-20 15:20:47

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Arch programs from repos and multithread support

The programs don't have specific support AFAIK.  The kernels do...

x86_64 = 64
i686 = 8

Last edited by graysky (2010-12-20 15:21:52)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2010-12-20 15:20:56

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Arch programs from repos and multithread support

https://bugs.archlinux.org/task/21352

Thomas Bächler (brain0) wrote:

The settings have been changed to:
i686: 8 cores (maximum)
x86_64: 64 cores

Last edited by karol (2010-12-20 15:22:20)

Offline

#5 2010-12-20 15:36:59

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Arch programs from repos and multithread support

Mr. Alex wrote:

Support of how many CPU cores/threads maintainers compile programs with? Programs which are available from Arch repositories.

This is up to the application themself. Most apps are not written with SMP support.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#6 2010-12-20 15:49:48

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Arch programs from repos and multithread support

Mr.Elendig wrote:
Mr. Alex wrote:

Support of how many CPU cores/threads maintainers compile programs with? Programs which are available from Arch repositories.

This is up to the application themself. Most apps are not written with SMP support.

I know you asked for apps from the repos, but some from the AUR are multithreaded:
http://aur.archlinux.org/packages.php?ID=28623
http://aur.archlinux.org/packages.php?ID=23958
so use those if you need.

Offline

#7 2010-12-20 16:09:48

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: Arch programs from repos and multithread support

graysky wrote:

The programs don't have specific support AFAIK

https://wiki.archlinux.org/index.php/Makepkg
The MAKEFLAGS option can be used to specify additional options for make. Users with multi-core/multi-processor systems can specify the number of jobs to run simultaneously. Generally -j2, plus 1 for each additional core/processor is an adequate choice. Optimizing for multiple cores can sometimes increase compiling performance, shortening compile times. However, be warned that occasionally using anything but the default can cause compilation problems, though many have agreed that -j3 is fairly safe to use for the majority of packages.

Last edited by Mr. Alex (2010-12-20 16:10:26)

Offline

#8 2010-12-20 16:14:36

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Arch programs from repos and multithread support

Mr. Alex wrote:
graysky wrote:

The programs don't have specific support AFAIK

https://wiki.archlinux.org/index.php/Makepkg
The MAKEFLAGS option can be used to specify additional options for make. Users with multi-core/multi-processor systems can specify the number of jobs to run simultaneously. Generally -j2, plus 1 for each additional core/processor is an adequate choice. Optimizing for multiple cores can sometimes increase compiling performance, shortening compile times. However, be warned that occasionally using anything but the default can cause compilation problems, though many have agreed that -j3 is fairly safe to use for the majority of packages.

This only affects how many threads that make will spawn. It's compile time only and won't change the behaviour of the resulting binary one bit.

A single threaded app will always be single threaded, even if your compile forked off 30 threads when it compiled it.

Last edited by Mr.Elendig (2010-12-20 16:16:00)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#9 2010-12-20 16:16:01

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Arch programs from repos and multithread support

Mr. Alex wrote:
graysky wrote:

The programs don't have specific support AFAIK

https://wiki.archlinux.org/index.php/Makepkg
The MAKEFLAGS option can be used to specify additional options for make. Users with multi-core/multi-processor systems can specify the number of jobs to run simultaneously. Generally -j2, plus 1 for each additional core/processor is an adequate choice. Optimizing for multiple cores can sometimes increase compiling performance, shortening compile times. However, be warned that occasionally using anything but the default can cause compilation problems, though many have agreed that -j3 is fairly safe to use for the majority of packages.

'-j24' means you will compile the app using 24 threads but it may still be singlethreaded. One thing has nothing to do with the other.

Offline

#10 2010-12-20 16:20:53

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Arch programs from repos and multithread support

karol wrote:

'-j24' means you will compile the app using 24 threads but it may still be singlethreaded. One thing has nothing to do with the other.

Right!  Again, if the code itself supports multi-threads, and has been compiled with this support, it will use them if the kernel and your hardware supports them.  To echo what others have said, the make flags have nothing to do with the compiled app.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#11 2010-12-20 16:40:26

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: Arch programs from repos and multithread support

Thanks for explaination.

Offline

#12 2010-12-20 19:21:44

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Arch programs from repos and multithread support

I've found one package that is explicitly multithreaded: http://www.archlinux.org/packages/extra/i686/ypbind-mt/

Offline

#13 2010-12-27 06:22:35

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: Arch programs from repos and multithread support

How many cores/CPUs does program for compiling from AUR support (I guess it's makepkg)?

Offline

#14 2010-12-27 06:25:33

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,390
Website

Re: Arch programs from repos and multithread support

Read about MAKEFLAGS and look in makepkg.conf.

Offline

#15 2010-12-27 07:23:55

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: Arch programs from repos and multithread support

I have a 2-core CPU and configured multicore support as "-j3". It compiles like
1z4hh76.png

Offline

#16 2010-12-27 14:29:03

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Arch programs from repos and multithread support

@mra - try compiling something like a kernel and you'll see a more heavy usage.  Although not a compiling question, try doing some x264 encoding and you'll also see your processors pegged.

screenshot1td.png
That is w/ -j4 on a quad core chip (not -j5 when using the bfs!)

Last edited by graysky (2010-12-27 14:30:46)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB