1

When I do a tar command, like :

tar -xzvf xxxxxxxx
tar -zcvf xxxxxxxx

does the -v parameter reduce the performance of the operation or is this negligible ?

I find it usefull to track progress on heavy operations, but I would like to know if it is ok to keep it.

2 Answers 2

6

In most cases xxxxxxxx the performance the performance impact will be negligable, as you are only writing a few bytes to stdout for (unless you have tiny files) many more bytes read from the tar to store in files or vv. If you compress during creation, as in your second example, that will reduces the amount of bytes written, but also influence the processing time.

The only time I would worry about the -v is when you are working remotely and your connection is not that fast. Actual display of the file (directory, link, etc.) names processed can then slow down the actual processing.

1

If you use -v option , tar will use a bit more memory and write it on /dev/console or any active display . You can check time resault with time command .

But if you feel it makes heavy operation while you are connected to remote server via for example SSH , It might be poor connection to server . While you enter tar -xvf the process start on server and send console output to your screen . This may bring bunch of traffic and NIC buffer can't handle this traffic so you may feel some lag .

This option is noting to do just simple some echo . If you want to make sure how much memory and time will take away while you are using this option use time command and watch memory and buffer and cache while tar operating .

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .