?

Log in

No account? Create an account

Previous Entry | Next Entry

Dec. 15th, 2003

"Failure to think things through": old script to copy large files from the server where they are produced and install them on several front-end servers:

  • gzipped the file on the smbfs filesystem
  • copied the gzip output to the local machine
  • Moved the gzip output into the archive directory
  • install the gzip output on each remote machine
  • ssh to each remote machine to gunzip the file


The smbfs access is over an expensive (slow) link, all the other servers talk over a cheap (1Gb Ethernet) LAN. Spot how the file gets copied via smbfs twice (in fact, twice uncompressed and twice compressed). Excellent. If you're going to go to this much effort to conserve network bandwidth, think it out first, ffs.

And don't get me started about the excessive shilly-shallying about it used to do in copying from one machine to another, and then that machine copying it to a third to get installed, none of which network tomfoolery had been required for the past year or so.

Comments

( 2 comments — Leave a comment )
kilinrax
Dec. 15th, 2003 04:13 am (UTC)
Sounds familiar
Although I only count:

  1. Copied from smbfs to local memory for gzip

  2. Written back to smbfs by gzip, compressed

  3. Read from smbfs by 'cp'


That's one uncompressed, and two compressed. Am I missing something, or is the script even more wasteful than described?
araqnid
Dec. 15th, 2003 04:27 am (UTC)
Re: Sounds familiar
Gah, I think I braino'd pretty severely on this... but I did have to explain to someone that gzipping a file on a remote filesystem will still involve copying the file over the network uncompressed.

Actually, the full original system in its nastness is:

* gzip file over smbfs on [[production machine 1]]
* scp file from smbfs to [[other machine]]
* cron job on [[other machine]] scps file to [[production machines 1..n]]

hence completely useless step of copying via [[other machine]]

all done in nasty shell script

it makes my head hurt just to think about it
( 2 comments — Leave a comment )

Profile

araqnid
Steve Haslam

Latest Month

March 2009
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031    

Page Summary

Powered by LiveJournal.com
Designed by Tiffany Chow