I/O is an acronym for Input/Output, which refers to the mechanism or process for the transfer of information between one system or component and another.
3
votes
1answer
256 views
Removing redirection operator does not change output. Why?
I saw this usage of redirection somewhere, and thought it was a typo:
grep root < /etc/passwd
But after I run it, I saw that it gives the same output with
grep root /etc/passwd:
$ grep root ...
1
vote
1answer
423 views
iostat usage and output
When I run the iostat command like this:
iostat -d
I get a result something like this:
Linux 2.6.18-238.el5 (mon01) 09/03/2011
Device: tps Blk_read/s Blk_wrtn/s Blk_read ...
1
vote
1answer
1k views
How can I specify that curl (via command line) overwrites a file if it already exists?
I'm using curl in this syntax:
curl -o myfile.jpg http://mysite.com/myfile.jpg
If I run this command twice, I get two files:
myfile.jpg
myfile-1.jpg
How can I tell CURL that I want it to ...
6
votes
4answers
359 views
copy consumed output to stdout when stdout is redirected to a file
Given a command the output of which is being processed by, for example, grep I also want the actual output to be included in the log file for debugging purposes.
For example if I have the following
...
2
votes
1answer
197 views
How race conditions affect reads and writes (that happen at the same time)
Let's say I open a file a for reading. What if an application, let's call it aWriter writes to this file in random intervals. Are there any possibilities of me receiving improper file contents if I ...
8
votes
1answer
558 views
Measuring disk I/O usage of a program
time is a brilliant command if you want to figure out how much CPU time a given command takes.
I am looking for something similar that can measure the disk I/O of the program and any children. ...
5
votes
2answers
832 views
How to stop xargs from badly merging output from multiple processes?
I'm using xargs with the option --max-args=0 (alternatively -P 0).
However, the output of the processes is merged into the stdout stream without regard for proper line separation. So I'll often end ...
6
votes
2answers
412 views
Piping output from a segfaulting program
I have a script that calls a program (specifically, ttf2afm, part of tetex 3.0) that sometimes segfaults and sometimes doesn't. The information I need is always printed out before it segfaults, but ...
13
votes
2answers
2k views
When is dd suitable for copying data? (or, when are read() and write() partial)
Short version: In what circumstances is dd safe to use for copying data, safe meaning that there is no risk of corruption due to a partial read or write?
Long version — preamble: dd is often used to ...
11
votes
2answers
750 views
Weight-based block IO control for VMs
I use KVM to manage my virtual machines. I am trying to limit the resources provided for VMs. I am able to limit the CPU and memory allocated for VMs using libvirt/cgroups. Now I want to control the ...
5
votes
3answers
4k views
Find out what processes are writing to hard drive
On my Lenovo T400 and Ubuntu, the light for hard drive writing keeps flashing. I was wondering if in Linux it is possible to find out what processes are doing I/O to the hard drive? Just like by top, ...
1
vote
1answer
198 views
performance on Linux system when daisy-chaining multiple USB hard-drives on USB hubs?
What would the I/O access be like as I plug many USB drives into a Linux system with only 2 USB 2.0 ports and 1 USB 3.0 port? I expect I will have to have multiple levels of fan-out by plugging hubs ...
0
votes
1answer
117 views
What Linux tool will tell me if all the mounted disks share roughly the same bandwidth?
What Linux tool will tell me if all the mounted disks share roughly the same bandwidth? Can I do something like iostat for each of my /dev/sd* devices?
2
votes
1answer
254 views
Pluggin a bunch of USB hard drives into a Linux system?
I've got a Linux system with two USB 2.0 ports and one USB 3.0 port, and I would like to know how many USB hard drives I could plug into it.
On the performance side, what would the I/O access be like ...
0
votes
1answer
236 views
How to test the difference between using disk encryption or not?
If I have a laptop, and I want to install an Ubuntu 11.04 on it, but disk performance would be an important thing, then how could I test the real differences between:
- not using encryption
- ...
4
votes
3answers
775 views
Intercept input and output from specific executable
I have a certain Linux executable that is called from a bigger application to perform some calculations. I want to modify the way the calculations are performed, for that I first need to understand ...
4
votes
2answers
1k views
Hight iowait while the wMB/s is low
I was indexing a MySQL table. It makes a high load on that computer.
It seems due to a high iowait. But it also shows that the wMB/s is only 2.87.
Isn't even a common SATA HDD able to handle more ...
3
votes
3answers
156 views
Changing the disk scheduler on the fly
Can the Linux disk scheduler be changed on the fly by writing to /sys/block/sda/queue/scheduler? Should applications (e.g. Mysql) be stopped / started when changing?
4
votes
4answers
295 views
performance monitoring
Is there some performace monitoring tool which would run in background gathering info about all system activity? Somethimes my system (Arch linux, 32 bit) slows down terribly and the top utility ...
4
votes
1answer
420 views
Does IO prioritise by the very nature of renicing a task?
The CFQ IO scheduler supports priorities though I am not sure that Deadline does (I believe not). The premise is that when I renice a task it gets a larger share of CPU under the Completely Fair ...
9
votes
6answers
16k views
How can I read line by line from a variable in bash?
I have a variable which contains multiline output of a command. What's the most effecient way to read the output line by line from the variable?
For example:
jobs="$(jobs)"
if [ "$jobs" ]; then
...
6
votes
3answers
2k views
How can I monitor disk I/O in a particular directory?
I've got a few processes with a known name that all write to files in a single directory. I'd like to log the number of disk block reads and writes over a period (not just file access) to test whether ...
5
votes
2answers
3k views
Run process with higher priority
I want to run mplayer with higher priority than any other processes, including the IO-processes. How can I do that?
4
votes
1answer
447 views
“Split I/O”s on a Linux VM, disk alignment
I'm trying to figure out if there's some way I can tell if a system is being adversely affected by disk misalignment -- i.e. when I do a disk I/O operation, it actually needs to request extra blocks ...
13
votes
2answers
3k views
Why does high disk I/O reduce system responsiveness/performance?
I never quite understood why high disk I/O slowed the system so much. It's strange to me because I would expect the slow-down to affect only those processes dependent on the hard/optical drive data, ...
8
votes
1answer
858 views
What's the progress regarding improving system performance/responsiveness during high disk I/O?
Whenever there is high disk I/O, the system tends to be much slower and less responsive than usual. What's the progress on Linux kernel regarding this? Is this problem actively being worked on?
4
votes
3answers
711 views
How to get output from a remote shell
I have an application running on a server, started from the command line. From time to time, I need to connect to the server via SSH and get the output messages written to stdout from the application. ...
6
votes
3answers
539 views
Deleting lots of files
I accidentally created 8 million files and every time I'm trying to delete them the server almost dies because of the rm process eating all disk IO (the server is remote without console).
Should ...
4
votes
1answer
804 views
How do I view the IO priority of a process?
How can I view the IO priority of a process? like to see for example if something has been ionice-ed.
5
votes
2answers
3k views
root user denied access to .gvfs in rsnapshot?
I was running rsnapshot as root and I got the following error. Why would this happen? what is .gvfs?
rsnapshot weekly slave-iv
...
11
votes
2answers
2k views
Measure pipe throughput in the shell
There is a shell command that allows to measure how fast the data goes through it, so you can measure the speed of output of commands in a pipe. So instead of:
$ somecommand | anothercommand
you ...
25
votes
4answers
2k views
Redirecting stdout to a file you don't have write permission on
When you attempt to modify a file without having write permissions on it, you get an error:
> touch /tmp/foo && sudo chown root /tmp/foo
> echo test > /tmp/foo
zsh: permission ...
8
votes
2answers
1k views
Heavy write activity on SSD nukes system performance
I've noticed that when I do heavy write applications, the whole system slows down. To test this further I ran this to do a (relatively) low-CPU, high disk activity:
john -incremental > file_on_SSD
...
10
votes
1answer
480 views
How do I go about tracking down IO usage in Linux and other *nix OS'?
Occasionally, something on my system starts hammering the disk. I would like to log data that would let me know about I/O usage per process, then I could go back to it later and see what keeps doing ...
24
votes
12answers
2k views
How can I tweak my Linux desktop to be more responsive?
I have the experience that Linux works fine until the physical memory is exhausted. As soon as swap space is used the performance is severely degraded and the GUI becomes unresponsive.
This problem ...