amuck-landowner

use statcounter and disable access.log?

Mid

New Member
If I use services like statcounter (which provides offsite web stats),

Can I disable access log in web server?

Is it functionally equivalent to having accesslog enabled

and running stats software (like goaccess) locally?

I don't expect much on stats and would be satisfied with those on

services like statcounter.com and w3counter.com

I think the only thing I won't be able to get from statcounter

would be bandwidth stats; am I right? But I need bandwidth stats!

(how they could know how many times my files are downloaded?)
 
Last edited by a moderator:

WebSearchingPro

VPS Peddler
Verified Provider
Is statcounter one of those javascript things you embed? If that's the case you will not see 404 errors or 403 errors or even 500 errors if they cant even load the javascript bits. People like myself may block all scripts to avoid tracking, however the server logs will still contain my activity regardless of my browser settings.
 

raindog308

vpsBoard Premium Member
Moderator
If I use services like statcounter (which provides offsite web stats),

Can I disable access log in web server?
What is your motivation for doing so?

You'd be chasing the last .1% of performance gains.
 

nunim

VPS Junkie
Why would you want to disable the access log?  You can clear it regularly if your site is that busy, or at least log rotate it.

If you're really after the performance gain, why not stick the access log on a Ramdisk and logrotate it out daily/hourly/whatever depending on how large your log is.  This why you still have the access log, which is quite useful at diagnosing issues/attacks/whatnot.
 

Mid

New Member
Is statcounter one of those javascript things you embed? If that's the case you will not see 404 errors or 403 errors or even 500 errors if they cant even load the javascript bits. People like myself may block all scripts to avoid tracking, however the server logs will still contain my activity regardless of my browser settings.
I wasn't talking about error.log (but access.log), and I guess those would go to error.log whether or not they are mentioned in access.log.
 

Mid

New Member
What is your motivation for doing so?

You'd be chasing the last .1% of performance gains.
If that is the case (last .1%) , I wouldn't want to disable access.log. I thought avoiding frequent writing on the disk could improve performance.

I am new to vps and don't have a site yet (just getting familiar with things). I tried setting up goaccess on my debian vps but it had an old version on its repo, so removed it and tried installing from sources but didn't have success. Moreover it also takes memory if I run it on the vps, so I tried having a linux bootable usb stick (downloaded mint) and installing goaccess with it (aiming to download access.log and run locally); it worked but it doesn't persist even though it was mentioned on YUMI that mint (deb edition) is having persistent feature. I earlier had SLAX running from usb stick, but it doesn't have packages wich I want to run (though it has persistent feature)

I was thinking of having a ArchLinux running on usb stick (Arch seem to support that feature and it has a lot of packages) but it seems I need to learn a lot to go the Arch way ...
 

Mid

New Member
... If you're really after the performance gain, why not stick the access log on a Ramdisk and logrotate it ...
I already agreed on raindog308's advice and decided not to chase the last .1% performance :)

But, you mentioned about Ramdisk, Is it possible to setup one on a vps? If so, would appreciate any links/names about any quality (free) software for that. I think I can use it with nginx for serving static downloads (without reading from disk unnecessarily). The files/downloads won't change frequently (at least several weeks) and so I think a cache for it would improve performance (in this case at least it would be far more than the .1% I think) :)

Upon googling, I came to know that apache has that kind of feature called FileCache, but ngingx doesn't seem to have support for this (or does it?)
 

nunim

VPS Junkie
I would recommend against this, a regular VPS with Raid 10 should have no trouble reading at line speed.  If you have a ton of small files that are hit very very often maybe it'd make sense but I don't really see it.  If you have high I/O requirements, go for an SSD VPS as it will serve you much better than a ramdisk.

Creating a ramdisk is quite simple, create a directory then mount it:


mkdir -p /media/ramdisk
mount -t tmpfs -o size=512M tmpfs /media/ramdisk
Nginx has something similar to mod_filecache, I've never used it myself but here's a tutorial article:

https://rtcamp.com/tutorials/nginx/open-file-cache/

If your files aren't huge and don't change that frequently you could consider putting them on a CDN.
 

Mid

New Member
Thanks for the suggestion to not go for this. I was just thinking if files are not going to change most of the time, then why the web server should read them always from the disk (not a bad thought though I think).

I wasn't aware of this ramdisk capability with mount itself. Thanks for the information.

As for nginx's open file cache, it doesn't cache file contents (as far as I read). Even the tutorial link you provided says like that. Upon my googling I think that apache's FileCache does cache file contents.

Any equivalent of that in nginx?
 
Top
amuck-landowner