Tag Info

New answers tagged

2

You probably do not need the temporary files, since you read from STDIN. So there is really no reason to use split. Get rid of the files by using --pipe: cat words | parallel --pipe -L 1000 -N1 ./script.sh If it is really just a grep you want: find dir-with-5000-files -type f | parallel -X grep -f words.txt If words.txt is too big to fit in memory, ...


4

You can use the split tool: split -l 1000 words.txt words- will split your words.txt file into files with no more than 1000 lines each named words-aa words-ab words-ac ... words-ba words-bb ... If you omit the prefix (words- in the above example), split uses x as the default prefix. For using the generated files with parallel you can make use of a ...


1

You can try this in terminal: sudo lscpu This will give you an overview of your cpu physical trait. As for turbo boost or not, this is purely hardware control than the OS itself, so unless Intel has a specific drivers for Linux that can tune your processor speed, there's no solid lead to check the turbo boost state (unless there's a command code for it. ...


3

The words “CPU”, “processor” and “core” are used in somewhat confusing ways. They refer to the processor architecture. A core is the smallest independent unit that implements a general-purpose processor; a processor is an assemblage of cores (on some ARM systems, a processor is an assemblage of clusters which themselves are assemblages of cores). A chip can ...


0

System load and cpu% are two different ways to measure how your cpu power is used. system load: how many processes per cpu have been in "ready" state - averaged over some time. Up to 1*cpu (in your case up to 4) the system is regarded as nearly idle (compare with a supermarket where on average only one customer is waiting at every checkout). You will ...


3

I'm not entirely sure what you're asking here. Yes, top shows CPU usage as a percentage of a single CPU by default. That's why you can have percentages that are >100. On a system with 4 cores, you can see up to 400% CPU usage. You can change this behavior by pressing I (that's Shift + i and toggles "Irix mode") while top is running. That will cause it to ...


4

Just answering your first question. In the output of cat /proc/cpuinfo you can see the following information:- physical id : 0 siblings : 4 core id : 0 cpu cores : 2 You can see the count of siblings is 4 and cpu cores is 2. cpu cores being 2 is that total number of cores in the processor which can be checked from the spec given in the intel's ...


1

Yes, the output is mixed because of xargs -P. You're executing several subprocesses in parallel, and there is nothing to coordinate their output: they're all writing output whenever they want and it all gets mixed up. Use GNU Parallel, which is a far more powerful tool to do the same job as xargs -P. Its default is to group output from each job together. ...


1

Any time you have multiple processes outputting to the same terminal (or file) in parallel, you run the risk of their output getting interspersed (unless you arrange to do some sort of locking or use low-level system calls like write to files opened in append-only mode). As a first step, you can minimize, but not totally eliminate, the problem by having ...


6

In this specific case, you're passing -P 3 to xargs. -P max-procs Run up to max-procs processes at a time; the default is 1. If max-procs is 0, xargs will run as many processes as possible at a time. Use the -n op‐ tion with -P; otherwise chances are that only one exec will be done. Because you're running them in ...


2

Create myFileWithCommands.txt: php index.php import file1 --offline php index.php import file2 --deleteUnused php index.php import file3 Then run parallel like this: parallel -j 3 -- < myFileWithCommands.txt


2

Well, there are two simple ways to accomplish this that I can imagine. You can either pipe the contents of the file into parallel, or you can write a shell script. If all you want to accomplish is this particular set of tasks, then a shell script might make more sense. It would be very short, sweet and to-the-point as well: #!/bin/sh parallel -j 3 -- "php ...



Top 50 recent answers are included