* FTP and RCP severe limitations?
@ 2000-02-26 5:00 Mark M.
2000-02-26 5:00 ` Adam Price
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Mark M. @ 2000-02-26 5:00 UTC (permalink / raw)
I work once in a while on two DEC Alphastation 166's with OSF/1, (version is
about 2 yrs old). Each system is identical (like two engines on a plane, to
keep it flying in all conditions) because we run a mission-critical Process
Control system on it that operates heavy equipment at a shipping site.
Here's the problem: Every hour of every day a 250k file is created
containing history for the hour (24 files per day). We have about 50,000
files now and it continues to grow on each machine at 24 files per day in a
single directory. When I use "ftp -i" or even "rcp" to copy files from one
machine to the other it only permits me to copy about 250 to 300 files at a
time, (I use a wildcard when transferring). If my wildcard is going to
access more than this number of files I get some sort of error saying that
"it's too much to do at once".
I must copy history periodically between machines because sometimes one
machine goes down, and therefore gets a "history hole" that has to be filled
with files from the other machine. Another reason for copying large numbers
of files is when I want to copy a directory within a single machine, and in
this case, the same problem occurs.
Is there a setting I can change on the system so that I can copy as many
files as I want? This seems like a ridiculous limitation we are living with.
To compensate for this limitation I have been saving massive directories
with TAR, then restoring the directories all at once to the second machine,
(but this is also slow since the machines are about a kilometre apart,
connected by fibre).
Mark M.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: FTP and RCP severe limitations?
2000-02-26 5:00 FTP and RCP severe limitations? Mark M.
2000-02-26 5:00 ` Adam Price
@ 2000-02-26 5:00 ` Bob Harris
2000-02-29 5:00 ` Joerg Bruehe
2 siblings, 0 replies; 8+ messages in thread
From: Bob Harris @ 2000-02-26 5:00 UTC (permalink / raw)
To: Mark M.
[[ This message was both posted and mailed: see
the "To," "Cc," and "Newsgroups" headers for details. ]]
In article <Q7Qt4.13919$mK.1052551@brie.direct.ca>, Mark M.
<anonymous@direct.ca> wrote:
XI work once in a while on two DEC Alphastation 166's with OSF/1, (version is
Xabout 2 yrs old). Each system is identical (like two engines on a plane, to
Xkeep it flying in all conditions) because we run a mission-critical Process
XControl system on it that operates heavy equipment at a shipping site.
X
XHere's the problem: Every hour of every day a 250k file is created
Xcontaining history for the hour (24 files per day). We have about 50,000
Xfiles now and it continues to grow on each machine at 24 files per day in a
Xsingle directory. When I use "ftp -i" or even "rcp" to copy files from one
Xmachine to the other it only permits me to copy about 250 to 300 files at a
Xtime, (I use a wildcard when transferring). If my wildcard is going to
Xaccess more than this number of files I get some sort of error saying that
X"it's too much to do at once".
X
XI must copy history periodically between machines because sometimes one
Xmachine goes down, and therefore gets a "history hole" that has to be filled
Xwith files from the other machine. Another reason for copying large numbers
Xof files is when I want to copy a directory within a single machine, and in
Xthis case, the same problem occurs.
X
XIs there a setting I can change on the system so that I can copy as many
Xfiles as I want? This seems like a ridiculous limitation we are living with.
XTo compensate for this limitation I have been saving massive directories
Xwith TAR, then restoring the directories all at once to the second machine,
X(but this is also slow since the machines are about a kilometre apart,
Xconnected by fibre).
This is a "Kludge" but can you use 'rsh' to either start a script
running on the remote system or to pass commands over to the remove
system to be run.
If you can, then may be you could use 'find' to collect the names of
the files to transfer and then have the remote system push them over to
you via 'rcp' or an 'ftp' utility running in a script.
Or use 'rsh' to run 'find' on the remote system and return the list of
files to the local system where you can run 'rcp' using the list of
files returned.
this is just psuedo shell code which I have not debugged nor I have I
run it. It is just to give an idea of what I mean.
#!/bin/ksh
rsh -l username remote_host find /directory_of_histories -print | \
while read file
do
rcp remote_host:$file local_destination
done
exit
In this case the 'find' command is shipped to the remote system, but
its output is passed back to the local system where it is piped into a
shell script 'while' command that reads each filename into the variable
'file'. The 'while' loop then executes an 'rcp' command for each file
to be copied.
You could just as easily pass over all the commands to be executed on
the remote, or you could copy over a script to find the files and have
the remote system copy them over to your local system.
You could also pass over the 'ls -1' command to get a list of files in
the directory.
Your 'while' loop can do some filtering based on the names if that is
desired. The 'find' command can do various selection services such as
only selecting files that less than a day old
find /dir -mtime -3 -print
I hope this helps.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: FTP and RCP severe limitations?
2000-02-26 5:00 FTP and RCP severe limitations? Mark M.
@ 2000-02-26 5:00 ` Adam Price
[not found] ` <shu2iuh8v5.fsf@lns130.lns.cornell.edu>
2000-02-28 5:00 ` Mark M.
2000-02-26 5:00 ` Bob Harris
2000-02-29 5:00 ` Joerg Bruehe
2 siblings, 2 replies; 8+ messages in thread
From: Adam Price @ 2000-02-26 5:00 UTC (permalink / raw)
A few thoughts,
1) Your current problem is the command line limit of the shell and
the fact that your wildcard gives too long a line... Open source shells
such as bash or pdksh could be recompiled with bigger limits to suit your
needs.
2) Is there any reason why each file can't be copied as it is created?
since copying files one at a time shouldn't ever cause this problem, should
be safer in the event of a disaster, and shouldn't really be a problem to
implement (use cron).
3) With your current tar method, you could compress the tar file before you
send it, which will make the whole process much quicker(less bits over the
wire).
4) Would nfs or perhaps one of the disk mirror products such as ASCI's remote
shadow product serve you better?
Hope this helps
Adam Price
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: FTP and RCP severe limitations?
[not found] ` <shu2iuh8v5.fsf@lns130.lns.cornell.edu>
@ 2000-02-27 5:00 ` Adam Price
0 siblings, 0 replies; 8+ messages in thread
From: Adam Price @ 2000-02-27 5:00 UTC (permalink / raw)
Daniel S. Riley wrote in message ...
>"Adam Price" <adam+usenet@pappnase.demon.co.uk> writes:
>> 1) Your current problem is the command line limit of the shell and
>> the fact that your wildcard gives too long a line... Open source shells
>> such as bash or pdksh could be recompiled with bigger limits to suit your
>> needs.
>
>Ultimately, there's a limit on the length of the arguments you can
>hand to exec(2) that there's no getting around. This is set by the
>system limit ARG_MAX--on Tru64 (4.0f), ARG_MAX is 38912 bytes, which
>you can check with 'getconf ARG_MAX'. AFAIK increasing ARG_MAX
>requires recompiling the kernel from source--it doesn't seem to be a
>tunable paramter.
>
>38912 does seem small--our Solaris systems have ARG_MAX = 1048320
>bytes, which is overkill, but better than the tiny 38912.
Having just read the man page for exec it seems you are right,
but still hopefully the rest of my suggestions would be of some
use.
Thanks for the info Daniel,
Adam.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: FTP and RCP severe limitations?
2000-02-26 5:00 ` Adam Price
[not found] ` <shu2iuh8v5.fsf@lns130.lns.cornell.edu>
@ 2000-02-28 5:00 ` Mark M.
2000-02-28 5:00 ` Jack Patteeuw
2000-02-28 5:00 ` Daniel S. Riley
1 sibling, 2 replies; 8+ messages in thread
From: Mark M. @ 2000-02-28 5:00 UTC (permalink / raw)
I will try the following, but don't know if it's possible due to my limited
knowledge of Unix:
Can I 'tar' the files to a single tar file rather than tape. Then copy the
single tar file to the other machine. Then un-tar it? Presently I tar it to
tape, then drive the tape to the other machine, hook it up, then read it
from tape.
I presume that doing it to a file and transferring by wire is probably
possible so I will check this out.
Mark M.
Adam Price wrote in message
<951591946.16366.0.nnrp-06.c2deb51d@news.demon.co.uk>...
>A few thoughts,
>1) Your current problem is the command line limit of the shell and
>the fact that your wildcard gives too long a line... Open source shells
>such as bash or pdksh could be recompiled with bigger limits to suit your
>needs.
>
>2) Is there any reason why each file can't be copied as it is created?
>since copying files one at a time shouldn't ever cause this problem, should
>be safer in the event of a disaster, and shouldn't really be a problem to
>implement (use cron).
>
>3) With your current tar method, you could compress the tar file before you
>send it, which will make the whole process much quicker(less bits over the
>wire).
>
>4) Would nfs or perhaps one of the disk mirror products such as ASCI's
remote
>shadow product serve you better?
>
>Hope this helps
>Adam Price
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: FTP and RCP severe limitations?
2000-02-28 5:00 ` Mark M.
2000-02-28 5:00 ` Jack Patteeuw
@ 2000-02-28 5:00 ` Daniel S. Riley
1 sibling, 0 replies; 8+ messages in thread
From: Daniel S. Riley @ 2000-02-28 5:00 UTC (permalink / raw)
"Mark M." <anonymous@westshore.com> writes:
> Can I 'tar' the files to a single tar file rather than tape. Then
> copy the single tar file to the other machine. Then un-tar it?
> Presently I tar it to tape, then drive the tape to the other
> machine, hook it up, then read it from tape.
Sure--just do something like
tar cf archive.tar subdir
That tar's everything in the directory 'subdir' into a file called
archive.tar (make sure you don't write the tar file to the directory
that you are archiving--or it may try to archive itself!). rcp or ftp
that to the remote system, and untar it with
tar xf archive.tar
You can even eliminate the intermediate file (this is a more advanced
Unix idiom--you might want to experiment a bit to get comfortable with
the concepts before trying this in a production environment):
tar cf - subdir | rsh remotehost '(cd /path/on/remote/host ; tar xf -)'
That tar's up subdir and writes it to stdout, which is piped into an
rsh to remotehost. The shell on remotehost cd's to /path/on/remote/host,
and unpacks stdin (your tar "file"!) into /path/on/remote/host/subdir.
If you have a slow link and fast cpu's, you can compress it along the
way
tar cf - subdir | compress | \
rsh remotehost '(cd /path/on/remote/host ; zcat | tar xf -)'
Pipes let you do all sorts of tricky things--learning a few of the
common idioms can save you a lot of work.
--
Dan Riley dsr@mail.lns.cornell.edu
Wilson Lab, Cornell University <URL:http://www.lns.cornell.edu/~dsr/>
"History teaches us that days like this are best spent in bed"
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: FTP and RCP severe limitations?
2000-02-28 5:00 ` Mark M.
@ 2000-02-28 5:00 ` Jack Patteeuw
2000-02-28 5:00 ` Daniel S. Riley
1 sibling, 0 replies; 8+ messages in thread
From: Jack Patteeuw @ 2000-02-28 5:00 UTC (permalink / raw)
"Mark M." wrote:
> Can I 'tar' the files to a single tar file rather than tape. Then copy the
> single tar file to the other machine. Then un-tar it? Presently I tar it to
> tape, then drive the tape to the other machine, hook it up, then read it
> from tape.
Never under-estimate the bandwidth of 4 wheels !! For really big data
sets,
`tars` (the Southern pronunciation of the British tyres) will frequently
beat many network connections !!!!
Jack
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: FTP and RCP severe limitations?
2000-02-26 5:00 FTP and RCP severe limitations? Mark M.
2000-02-26 5:00 ` Adam Price
2000-02-26 5:00 ` Bob Harris
@ 2000-02-29 5:00 ` Joerg Bruehe
2 siblings, 0 replies; 8+ messages in thread
From: Joerg Bruehe @ 2000-02-29 5:00 UTC (permalink / raw)
Hi !
"Mark M." schrieb:
> ((...))
>
> Here's the problem: Every hour of every day a 250k file is created
> containing history for the hour (24 files per day). We have about 50,000
> files now and it continues to grow on each machine at 24 files per day in a
> single directory. ((...))
Others have already commented about the arguments restrictions
imposed by 'exec()', about 'tar' etc.
IMHO, you will sooner or later hit performance problems due to
directory size, like you now hit handling problems.
Even though it may work the way you have it, I strongly suggest
that you use a hierarchical directory scheme, maybe along the lines of
year/day/hour
(example: "y2000/d60/h12" ) and so limit the number of entries in
each directory (maximum 366, days per year).
Regards, Joerg Bruehe
--
Joerg Bruehe, SQL Datenbanksysteme GmbH, Berlin, Germany
(speaking only for himself)
mailto: joerg@sql.de
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2000-02-29 5:00 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-02-26 5:00 FTP and RCP severe limitations? Mark M.
2000-02-26 5:00 ` Adam Price
[not found] ` <shu2iuh8v5.fsf@lns130.lns.cornell.edu>
2000-02-27 5:00 ` Adam Price
2000-02-28 5:00 ` Mark M.
2000-02-28 5:00 ` Jack Patteeuw
2000-02-28 5:00 ` Daniel S. Riley
2000-02-26 5:00 ` Bob Harris
2000-02-29 5:00 ` Joerg Bruehe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox