Folder limit in Win2K server?

  • Does anyone know if there is a sub-folder limit (total or per folder) on Win2k server?

    Some bright spark wants to implement some software (backend foxpro when everything else we have is SQL2000) that stores images, video, audio files. The software automatically creates a folder for each student in a folder called "evidence"- we have 7000+ students so it will create 7000 sub-folders named after their ID no....

    I have grave concerns that the software wont scale up, isnt secure, is not user friendly, backups... - will they listen to us?

  • This has nothing to do with SQL...

    (Continuing anyway...)

    There seems to be a pathlength limit of about 247 characters, in my testing, but there should be no (practical) limits to the number of files or directories on an NTFS filesystem (maybe it's 2 or 4 billion?). If FAT16, you are limited to about 65500 1+-byte files or directories, but almost surely you are using NTFS, and if not, FAT32.

    Backup may be slow, because the NTFS directory structures tend to be big, and take a while to scan. In my experience, it can take a few minutes to scan 20,000 empty directories for files (Windows NT 4.0, Ppro200, years ago). If win2k defrags MFT and directories, you be able to keep that down low.

    Folder creation is quite slow in NTFS, based on this Perl script time, but you can see that my Athlon XP 2000 can create 9999 directories in 3 minutes, and delete them in 2 seconds:

    [running under Cygwin, a unix-like toolkit for Windows]

    user@computer /cygdrive/e/t

    $ time perl -e 'for (1..9999){`mkdir $_`}'

    real    3m0.509s

    user    0m42.469s

    sys     1m45.215s

    (about 30% CPU by CSRSS.exe, about 60% CPU by Perl)

    user@computer /cygdrive/e/t

    $ time cmd /c "rd /s/q ."

    The process cannot access the file because it is being used by another process.

    real    0m2.081s

    user    0m0.010s

    sys     0m0.010s

    Some programmers use hierarchical structures such as this for multilevel directories:

    \u\user

    \a\aaron

    \t\tim\

    Or even \t\ti\tim

    or \t\i\m

    Some may chose two characters per directory. This is helpful in FAT and Linux Ext2fs directory structures (linked-list type), but since NTFS (like ReiserFS) uses a btree structure, it's unnecessary. Avoid FAT with 7000 subdirectories, because it will be slow to scan all 7000 each time a lookup is done.

  • Thanks for the info Aaron

    It actually has quite alot to do with SQL - if we dont convince them its a rubbish solution/unscalable/insecure, we will be using foxpro!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply