Hi,

To limit number of stored files, please, use StoredFiles command in your 
stored.conf
For example:
StoredFiles 256


Krzysztof Drewicz wrote:

> 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) {
> 
> 



-- 
Maxim Zakharov            http://sochi.net.ru/~maxime/
  Sochi, Russia               http://www.sochi.com/


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

Reply via email to