Tag Info

New answers tagged

1

What is difference between | and <<()? There is a difference between them: | cause each command run in a separated subshell. <() run the command, which is substituted in background. For the next two question, we will do some strace: pipe: $ strace -fc bash -c 'tac /usr/share/dict/american-english | grep qwerty' $ time seconds ...


5

The construction <(tac file) causes to shell to: Create a pipe with a name On systems such as Linux and SysV which have /dev/fd, a regular pipe is used, and /dev/fd/<the-file-descriptor-of-the-pipe> is used as the name. On other systems, a named pipe is used, which requires creating an actual file entry on disk. Launch the command tac file and ...


0

To prime the cache with a whole file: cat big.file >/dev/null To prime the cache with a portion of a file, as per this comment: time dd if=big.file of=/dev/null bs=1024k count=XXX skip=YYY Example 2.5G file: $ time rarara big.file 0 2459650481 real 0m13.803s $ sync && echo 3 | sudo tee /proc/sys/vm/drop_caches $ time dd if=big.file ...


0

$ date; i=0; while (( i < 1000000 )); do (( i ++ )); done; date Tue Jul 15 11:26:37 EDT 2014 Tue Jul 15 11:26:43 EDT 2014 $


3

Collect all required information with monitoring commands: top → Current load and which processes consumes most of the cpu/memory free -m → Field under buffers/cache: Current memory status df -h → Check, if some of the local partitions running out of space Useful resources: ps aux --sort -rss sort most used processes by memory ps aux | sort -kr 3,3 | ...


2

Typically you can set the BIOS to handle USB support, which will work with whatever boot-loader from there. At that point you can have a separate image available to load with USB support for those times that everything goes to pot. This may not work as some USB devices aren't supported by some boot-loaders. Two notes: 1) I haven't tried this, though the ...


0

I suspect the --fake-super options. That tells rsync to store all the metadata information in extended attributes on each file. I suspect accessing those attributes are slow. Try a test run with rsync to a root without --fake-super. You can't reuse the same backup since the attributes won't match.


0

One thing that the other answers here don't seem to have directly addressed is that using cat like this isn't "useless" in the sense that "an extraneous cat process is spawned that does no work"; it's useless in the sense that "a cat process is spawned that does only unnecessary work". In the case of these two: sed 's/foo/bar/' somefile <somefile sed ...


3

Does this figure show segments that were retransmitted due to congestion or is it limited to lossy links? If so (and I'm thinking it might be the case) that might muddy the waters even more to the point of this not being a good metric to use. segments retransmitted in netstat -s includes all the kernel's TCP retransmissions for any reason, including ...


1

Concise Version: As @ninjalj pointed out, the workload application should probably be considered the authoritative source on whether any given adjustment was beneficial to workload performance. Depending on whether your requirements are latency or only overall throughput on the system, you can make the judgment call as to whether changes in behavior better ...



Top 50 recent answers are included