Re: Which delete statement is faster?



I have a directory with 200000+files, all in the a*.txt;1 range. I need to
ftp these files to another server. After sending 30,000+ files via FTP I
realized the magnatude of the ftp process, and interrupted it. I want to
delete the 30,000+ file already ftp'ed before going back and looking at
continueing the ftp process in a different manner and it just seems to be
taking an extremely long time to perform the delete. I think the hang up is
the re-write of the directory contents back to disk after a few files are
deleted. I did the delete with a /log to watch how long it took to delete a
file. I noticed a pause of a few seconds after it listed 15 to 20 files that
were deleted.....


Thank you for your help....

Mike

<briggs@xxxxxxxxxxxxxxxxx> wrote in message
news:iO4j523y6UmT@xxxxxxxxxxxxxxxxxxxxxxxxxxx
In article <13h9vel51sekc1b@xxxxxxxxxxxxxxxxxx>, "Mike Minor"
<mminorhsd@xxxxxxxxxxxxx> writes:
Is there any difference in the speed at which the command is executed in
the
following examples?

del a*.*;*
del a*.txt;*
del a*.txt;1

All things being equal (i.e. the only files in the directory that
match the a*.*;* wildcard also match a*.txt;1), I'd expect no significant
performance difference.

The real work is going to be the disk I/O writing directory contents
back to disk. Reading directory entries into cache and parsing
and searching directory entries from cache is unlikely to be the
bottleneck.

Why do you ask?

Historically, the thing that absolutely kills delete performance is
the "bubble down" that can take place if you delete the last directory
entry in a block near the front end of a _HUGE_ .DIR file.

Various tweaks over the years have improved this behavior by orders
of magnitude. If it's still an issue for you, a
reverse-alphabetical-order
delete is one thing that can sometimes be of use.


.



Relevant Pages

  • Re: First-timer buying AS/400 and have questions
    ... (writes memory to disk for the next boot). ... I use the Internet to get PTFs and FTP them to the AS/400. ... IBM was thinking bubble memory or some form of solid-state ... Running FTP from the AS/400 you use NAMEFMT 0 to mean the ...
    (comp.sys.ibm.as400.misc)
  • Re: Slow network performance
    ... From Linux to Linux (1 ... Also don't forget that Solaris doesn't run with disk write caching ... ftp> put eWA-1_000.zip ...
    (comp.unix.solaris)
  • Re: Annoying Crashes on SBS
    ... I hadn't thought of FTP. ... authenticated through IAS and SBS sees it like a machine on the network. ... IAS keeps just anyone from using it - anyone can login if they know the WAP ... hard disk so I am going to shut down and kaboom, ...
    (microsoft.public.windows.server.sbs)
  • Re: Strange FTP Transfer Rates
    ... the ftp is reading the file from the FS cache. ... > B> CPU speed and architecture will affect speed, as will disk config. ... Regular Ethernet usually has a max usable ...
    (comp.unix.aix)
  • Re: Strange FTP Transfer Rates
    ... the ftp is reading the file from the FS cache. ... B> CPU speed and architecture will affect speed, as will disk config. ... B> When I FTP across my SP switch from the MCA 200MHz node to my S80, ... Thanks Bill! ...
    (comp.unix.aix)