Varnish on FreeBSD

Olivier Nicole on at cs.ait.ac.th
Wed Apr 1 06:13:20 CEST 2009


Hi,

> Why use both malloc and file?  Varnish will spread objects equally
> between both storage backends.  You'd be better off using just the file.

OK, I removed that :)

> > The file system used for storage has 407 GB available and Varnish
> > plans to use up to 1626 GB out of that, that is far more than the 50%.
> 
> Try instrumenting str2bytes() in lib/libvarnish/num.c to show the
> details of the calculations.  In str2bytes(), p is a pointer to the size
> specification ("50%" in your case), fval is the numeric value (should be
> 50), rel is the size of the file system in bytes (should be
> approximately 407*2^30).

If I am not mistaken, adding

    	printf("%ju\n", rel);

at the begining of the function str2bytes should be enough, well I am
sorry to say that it prints: 3492003971072, about 3 TB, which is
compatible with the proposed 1665117 MB for the file size.

So I went back one step further and looked at smf_fsspace; the values
in fsst.f_bsize and fsst.f_bavail are consistent with the value of
rel, but are not corresponding to the size available in the file
system.


I will dig a bit further and keep you posted.

Best regads,

Olivier



More information about the varnish-misc mailing list