Re: Varnish on FreeBSD

2009-03-31 Thread Dag-Erling Smørgrav
Olivier Nicole o...@cs.ait.ac.th writes:
 $ /usr/local/sbin/varnishd -P /var/run/varnishd.pid -a localhost:6081 -f 
 /usr/local/etc/varnish/default.vcl -T localhost:6082 -s malloc,5G -s 
 file,/web/varnish,50% -u www -g www

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

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

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


[no subject]

2009-03-31 Thread Koteswara Rao

Hello,

I am using Varnish on Free BSD. I am using varanishncsa to output apache style 
logs from Varnish. My question is, how do I get varnishncsa to work with 
cronolog to rotate logs?

Please let me know if there's a document already somewhere for this.

Thanks in advance.

Eshwar
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


varnish stopps responding with no reason

2009-03-31 Thread Sascha Kain
Hi,

im was running squid3 for a while now, but now i tested varnish, to 
cache my cdn.

Following:
proxycache1:/var# varnishd -V
varnishd (varnish-2.0.3)

The Server is Debian Etch 4.0 incl. all official updates.
It has 24GB of RAM with 64Bit CPU.

I compiled and installed varnish with no errors. And it is running on 
one of my 2 Servers like a charm!
load of the server + delivery of my static files is great.

But i have a problem on the other machine, its exact the same.

I start varnishd like this:
varnishd -a :80 -b 89.xxx.xxx.xxx:80 -s malloc,15360M
storage_malloc: max size 15360 MB.
Using old SHMFILE

Im not using a config yet, since i only have one backendserver for 
static files.

In Log i see:
Mar 31 12:56:34 proxycache1 varnishd[4608]: child (4609) Started
Mar 31 12:56:34 proxycache1 varnishd[4608]: Child (4609) said Closed 
fds: 3 7 8 10 11
Mar 31 12:56:34 proxycache1 varnishd[4608]: Child (4609) said Child starts
Mar 31 12:56:34 proxycache1 varnishd[4608]: Child (4609) said Ready

Then i change my application-config to use the 2nd varnishd as proxy two 
(actually have an array of ips for my CDN).
All went well, it delivers fast.
After a few minutes it stops responding on Port 80, localhost + ethXips 
not working but Varnishd still running.
telnet give me timeout.

ps auxf:
root  4608  0.0  0.0  98196   944 ?Ss   12:56   0:00 
varnishd -a :80 -b 8xx.xxx.xxx:80 -s malloc,15360M
nobody4609  0.2  0.4 398384 114996 ?   Sl   12:56   0:03  \_ 
varnishd -a :8xx.xxx.xxx:80 -s malloc,15360M

I switch all traffic over to the other varnishd and its running smooth 
again...
I activate squid on the other server, and all works smooth again.

any ideas?

regards

-- 
Sascha Kain
IT / Administration
eraffe media GmbH  Co. KG Marketing - Consulting - Software
Schönfeldstr. 17 - 83022 Rosenheim

Fon: + 49 (0)8031 - 941 41 -46
Fax: + 49 (0)8031 - 941 41 -59
E-Mail: s.k...@eraffe-media.de
www.eraffe-media.de - www.eraffe.de

eraffe media GmbH  Co. KG, Sitz: Rosenheim,
Registergericht: AG Traunstein HR A Nr. 9104,
St-Nr. 156/157/58806, FA Rosenheim,
USt.-ID: DE250117972

Persönlich haftende Gesellschafterin:
eraffe media Verwaltungs-GmbH, Sitz: Rosenheim,
Registergericht: AG Traunstein HR B 16956
St-Nr. 156/116/90247, FA Rosenheim

Geschäftsführer: Maximilian Kuss, Oliver Döser

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re:

2009-03-31 Thread Olivier Nicole
Hi,

 I am using Varnish on Free BSD. I am using varanishncsa to output apache st=
 yle logs from Varnish. My question is=2C how do I get varnishncsa to work w=
 ith cronolog to rotate logs?

I am using native newsyslog from FreeBSD and simply send a SIGHUP to
varnishncsa process: in /etc/newsyslog.conf

/var/log/varnish-ncsa.log 644  7  * @T00  JC/var/run/varnishncsa.pid

Olivier
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnish on FreeBSD

2009-03-31 Thread Olivier Nicole
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
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc