Mailing List Archive

setting varnish storage size
Hi ,
I'm a bit confused about /var/lib/varnish/varnish_storage.bin
I use varnish 1.0.0.4 under linux fedora 6 ( using a vserver ).

I set in /etc/sysconfig varnish VARNISH_STORAGE_SIZE=2G
and the size of the file still remains to one GIGA

-rw------- 1 root root 1,0G jun 29 19:27
/var/lib/varnish/varnish_storage.bin

setting VARNISH_STORAGE_SIZE=2000G /var/lib/varnish/varnish_storage.bin


setting 3000G I get
-rw------- 1 root root 1,5G jun 29 19:29
/var/lib/varnish/varnish_storage.bin

mm what I don't understand ? ( the % parameter ?)

thanks
setting varnish storage size [ In reply to ]
jean-marc pouchoulon wrote:
> Hi ,
> I'm a bit confused about /var/lib/varnish/varnish_storage.bin
> I use varnish 1.0.0.4 under linux fedora 6 ( using a vserver ).
>
> I set in /etc/sysconfig varnish VARNISH_STORAGE_SIZE=2G
> and the size of the file still remains to one GIGA
>
> -rw------- 1 root root 1,0G jun 29 19:27
> /var/lib/varnish/varnish_storage.bin
>
> setting VARNISH_STORAGE_SIZE=2000G /var/lib/varnish/varnish_storage.bin
>
>
> setting 3000G I get
> -rw------- 1 root root 1,5G jun 29 19:29
> /var/lib/varnish/varnish_storage.bin
>
> mm what I don't understand ? ( the % parameter ?)
>
> thanks
>

Are you using 32-bit hardware?
If yes, there lies the problem.
I had similar issues when testing on my local 32-bit PC.
However once i installed on our actual servers (64-bit), the 1G limit
went away.
Have never tried setting the storage file to sizes in thousands of G
though.

Also, as far as i know, Linux will not support files bigger than 4G
unless the support is added to the kernel.
Not sure if Fedora Core 6 has the patch applied.

I cannot be very sure of this though.

Regards
A.S
setting varnish storage size [ In reply to ]
Bonjour Anup,

thanks for your answer but I am able to create lfs with dd and I haven't
got yet any 64 bits machine.

dd if=/dev/zero bs=1048576 count=5000 of=test.file
5000+0 enregistrements lus
5000+0 enregistrements ?crits
5242880000 octets (5,2 GB) copi?s, 57,1358 seconde, 91,8 MB/s

ls -alh test.file
-rw-r--r-- 1 root root 4,9G jui 2 13:25 test.file

the problem seems to be elsewhere.
I try to compile varnish with
gcc -D_FILE_OFFSET_BITS=64
but the limits of 2Gb still remains

Any ideas ?
thanks
jean-marc


>
> Are you using 32-bit hardware?
> If yes, there lies the problem.
> I had similar issues when testing on my local 32-bit PC.
> However once i installed on our actual servers (64-bit), the 1G limit
> went away.
> Have never tried setting the storage file to sizes in thousands of G
> though.
>
> Also, as far as i know, Linux will not support files bigger than 4G
> unless the support is added to the kernel.
> Not sure if Fedora Core 6 has the patch applied.
>
> I cannot be very sure of this though.
>
> Regards
> A.S
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-misc
>
setting varnish storage size [ In reply to ]
The limit is in the CPU hardware: with 32 bit address bits you
can only see 4GB of RAM at any one moment.

Usually operating systems and (PCI) devices eat up 1-2 GB of the
4GB, and you also need space for the program, shared librararies,
stack and other data.

Get a 64bit machine.

Poul-Henning

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.