Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
Is there a way to specify that an application run on a specific core on linux? Like for example:
firefox core0
Or something that'd function that way conceptually?
Make use of taskset from util-linux
cpuset also seems to be working. I'm not too familiar with it though. cpuset
Using taskset, which is a part of util-linux package you can do this. For details check here
Using taskset you can assign a running process to particular CPU core. For example, to assign a process to CPU core 0 and 4, do the following.
taskset -p 0x11 <pid>
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I have Chromium running on an embedded linux ARM system. What would be the best way to reduce its memory usage? I have tried running it with the "--single-process" switch, but that did not help much.
Are there any other command line switches or tips to get chromium to use less memory?
Thank you!
Pass this flags in Arguments to reduce the chromium memory usage
--disable-gpu
You can also refer this link: https://peter.sh/experiments/chromium-command-line-switches/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I want to modify sched.h to add in some scheduling algorithm. I use find / -name sched.h command finding a lot of results.But which one should I really modify ?
And in /usr/src,there are a lot of relating folders whose names are similiar. I'm using ubuntu14.04. Where are my real source code?
use uname -a to see which kernel you are currently running. After that, i would edit the /include/linux/sched.h for that kernel.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I would like to execute "lessc ~/less/app.less > ~/stylesheets/styles.css" everytime I modify a .less file on my machine. Is it possible ?
If you are looking for a generic approach, Linux kernel has a feature called inotify that monitors file system changes.
You will have to write a small program to make use of the interface. inotify has bindings for all major languages, including perl and python .
Take a look at incron, a crontab-like system for inotify. You can set up rules to trigger any commands you want, based on events in the filesystem.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I am using a Linux computer (Ubuntu) with n processors (15 as listed by /proc/cpuinfo). I have to run several applications and would like to run one in each processor. Is there a way to assign a processor to each application, or is it something that Linux does automatically?
Thank you very much
What you are looking for is called affinity.
Linux should already handle this on its own, but there are ways of changing the affinity of a process (sched_setaffinity) and also the command line tool taskset(1).
taskset is used to set or retrieve the CPU affinity of a
running process given its PID or to launch a new COMMAND with a
given CPU affinity.
Using taskset you can launch a process that will only become eligible to run on the cores you specify.
I'm not entirely sure they're the best tool for the job, but you might also want to investigate cgroups. I am almost certain they also allow pinning processes on certain CPUs.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have a rogue Apache process running on a Centos 6 Linux server, which is running up to 55% CPU and wondered how I can scrutinise exactly what function(s) it is performing? From the 'top' command I have its process ID, but how can I drill in to what it's up to?
Thank you
If you really want to see what it's doing, get familiar with the strace command. It will show you the system calls your process is making, but I imagine it would be a terrible tool for finding out performance issues. For that, take a look at something like gprof.