hi !

When my storage grew up to 1.2 GB and 2k files i've split it into 256
directories, it speeds up i/o.
Mayby this idea is simple c&p from squid, but it works for me:

--- /home/users/hunter/backup/stored.c~ Fri Nov  2 07:29:03 2001
+++ src/stored.c        Sat Jun  1 09:15:37 2002
@@ -193,8 +193,8 @@
                     closesocket(ns);
                    exit(0);
                  }
-                 sprintf(Sfilename, "%s/store/%04x.s", store_dir, FileNo);
-                 sprintf(Ifilename, "%s/store/%04x.i", store_dir, FileNo);
+                 sprintf(Sfilename, "%s/store/%01x/%01x/%04x.s", store_dir, 
+FileNo>>12, (FileNo>>8)%16,  FileNo);
+                 sprintf(Ifilename, "%s/store/%01x/%01x/%04x.i", store_dir, 
+FileNo>>12,  (FileNo>>8)%16, FileNo);

                  if ((Ifd = fopen(Ifilename, "rb+")) == NULL) {
                    if ((Ifd = fopen(Ifilename, "wb+")) == NULL) {

-- 
Krzysztof Drewicz
[EMAIL PROTECTED]
Unfortunately, no one can be told what the Mac is like.
You have to see it for yourself.


___________________________________________
If you want to unsubscribe send "unsubscribe general"
to [EMAIL PROTECTED]

Reply via email to