It's going to be a busy day
Sep. 10th, 2007 09:40 amSeems that one of our developers didn't fully test something on Friday. I know, because I ran into this earlier:
drwxr-x--- 2 exim exim 9502720 Sep 10 09:37 input
drwxr-x--- 2 exim exim 4153344 Sep 10 09:37 msglog
Those aren't files, those are directory structures that are nearly 15 Megs in total...
The normal size for a directory entry is 4096 bytes...
drwxr-x--- 2 exim exim 9502720 Sep 10 09:37 input
drwxr-x--- 2 exim exim 4153344 Sep 10 09:37 msglog
Those aren't files, those are directory structures that are nearly 15 Megs in total...
The normal size for a directory entry is 4096 bytes...
(no subject)
Date: 2007-09-10 01:51 pm (UTC)Good luck.
(no subject)
Date: 2007-09-10 01:53 pm (UTC)There were so many files in the directory that ls ran out of memory when trying to list it. I couldn't echo * because the shell would run out of memory globbing the directory contents.
I had to rm -rf the directory, recreate it, and run the script again to debug it before the directory got too large. rm -rf'ing it thankfully didn't run out of memory, but took forever.
(This was a few years ago when a typical workstation memory size was 256MB)
-Z
(no subject)
Date: 2007-09-10 01:54 pm (UTC)find . -type f -exec rm -f {} \;
This (hopefully) ensures that memory usage remains constant.
That's what I'm running right now...
(no subject)
Date: 2007-09-10 04:03 pm (UTC)(no subject)
Date: 2007-09-10 04:25 pm (UTC)Yeah... I forgot about the forking.
I tried doing the rm -rf method instead, and it didn't seem to be much faster. :-/
(no subject)
Date: 2007-09-10 04:05 pm (UTC)(no subject)
Date: 2007-09-10 04:02 pm (UTC)(no subject)
Date: 2007-09-10 02:05 pm (UTC)(no subject)
Date: 2007-09-10 05:41 pm (UTC)(actually NTFS's method is not that bad: stores tiny files in the entry, if that's too big then stores pointers to clusters in the inode, if there's too many it stores pointers to pointers).
(no subject)
Date: 2007-09-10 05:47 pm (UTC)That's exactly what ext2/ext3 does for files.
Maybe it does something similar for directories, I have no idea. The real issue here is that with a directory that has hundreds of thousands of files, that's a lot of data to shuffle through, no matter how you store it. :-P
(no subject)
Date: 2007-09-10 05:51 pm (UTC)yeeeek!
Date: 2007-09-10 10:01 pm (UTC)OC-48, to be precise.
IIRC, it actually filled the entire disk with directory trees.
(no subject)
Date: 2007-09-10 10:18 pm (UTC)(no subject)
Date: 2007-09-13 01:58 am (UTC)(no subject)
Date: 2007-09-13 02:01 am (UTC)