Re: How to increase maximum user cpu usage allowed on a multi core system?

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

 



On 11.03.2015, stan wrote: 

> What is the point of -j6 or -j8 if the make
> can't spawn additional processes with their own limits, and thus take
> advantage of more resources that are available?

The point is simply that you can exactly determine how many processes should be
used.

> What is it that limits
> a process and its children from using more resources than a single core,
> even though they are available?

As said, load balancing, task migration and thelike is done by the CPU
scheduler. A single process is not limited to a single core, but its load is
distributed over multiple cores.

> Can you point me to which area of the kernel has the code that does the
> actual load balancing?

Haven't looked into this for some time, but take a look into
/usr/src/linux/kernel/sched/fair.c.
(The CFS code is complex and difficult to understand, though - at least for me).

> Maybe it would be easy to do a custom patch that
> bypasses this limiting behavior. I understand that parallel computing
> requires parallel programming in the code, but I'm thinking more of
> letting make have more than a single core available.

Although there are voices saying that the actual CPU scheduler (CFS) underuses
the CPU (see e.g. the comments to the BFS), I'm afraid what you see is by
intention, and not a faulty behaviour.

> above, it is already using multiple cores.  I just want it to be able
> to use all of those multiple cores if they are available. 

I see.

> I can then start the job and let it run in the background with no
> impact to other things I am doing.

That is why I compile my things using "nice -n 19 make -j8" (on an 8-core).

> What I was hoping was that when I wanted to run things overnight,
> I could kick off a couple of compute intensive jobs, and
> they would share all the resources of the computer until they were
> done.

You'll never be able to use 100% of all resources, because the system has to
run while you're compiling. All you can do is to use multiple processes, if
appropriate and available.

Btw, here is a good explanation of Linux SMP scheduling:
http://tinyurl.com/o4nuaxr

And also take a look here:
https://www.kernel.org/doc/Documentation/scheduler/sched-design-CFS.txt
http://ck.kolivas.org/patches/bfs/3.0/3.18/3.18-sched-bfs-460.patch
(BFS is designed with latency in mind, not throughput).

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux