ClamWin Free Antivirus Forum Index
ClamWin Free Antivirus
Support and Discussion Forums
Reply to topic
blgd


Joined: 08 May 2007
Posts: 0
Reply with quote
Ok, I didn't try that way, not under Updates section, nor using "=" and nor as a standalone line.

After an update, now, the update didn't touch main file. Updated daily and, indeed, it got decompressed :S from a fresh download of 340KB (full binary compressed file) to a plain content file of 1035KB (the download was only 52KB), the same size using or not using the paramater, so it doesn't affect to daily file, or looks like.

So..., the only think I could expect from here, and following your guess, is that when daily file reaches a size, it appends to main file and then we could test if it just appends as plain text and make the file to grow or merges and compresses, because looks like the compression is only applicable to main file.
View user's profileSend private message
GuitarBob


Joined: 09 Jul 2006
Posts: 8
Location: USA
Reply with quote
You're right--it looks like the compression only applies to main database. There is probably a reason. The Clam daily signature database is only merged with the main database a few times a year--maybe every 3 or 4 months. I'll make some people aware of this and see what happens. Anyway, it helps a little, eh?

Regards,
View user's profileSend private message
Re: main cld/cvd file size
tizef


Joined: 24 Feb 2012
Posts: 0
Location: France
Reply with quote
Hello all, as a new user I had exactly the same questions blgd had :

blgd wrote:
Hi, in the past I found strange things with the file size of main.cld/cvd (another question should be why 2 extensions :-? depending of if it is updated or not, or whatever) and I thought it was solved but after months without checking, looks the problem persists.

About the two extensions

1. CVD stands for "ClamAV Virus Database", native, compressed tarball ;
2. CLD stands for "ClamAV Local Database", updated, compressed or not.

References : lurker.clamav.net, wiki.clamav.net.

About the file sizes

I made my own little tests and it seemed pretty clear to me that the (case sensitive) option "CompressLocalDatabase" works fine.

1. With all (main, daily, bytecode) database files, but only ;
2. When the original file (cvd or cld) is already compressed.

I tried the CLI first, with a minimalistic new FreshClam.conf file :

Code:
"C:\Program Files\ClamWin\bin\freshclam.exe" --datadir="C:\Windows\All Users\.clamwin\db" --config-file="C:\Windows\Application Data\.clamwin\FreshClam.conf"

And then the GUI, with adding this line to the ClamWin.conf file :

Code:
[ClamAV]
freshclamparams = CompressLocalDatabase yes

As expected, the results were identical. Here are some details :

Code:
File: bytecode.cvd (Build time: 24 Oct 2011 Version: 152 Signatures: 38)
Size:  56876 bytes #this one is the "old" one
File: bytecode.cvd (Build time: 09 Feb 2012 Version: 167 Signatures: 40)
Size:  61588 bytes #this one is the "new" one
File: bytecode.cld (Build time: 09 Feb 2012 Version: 167 Signatures: 40)
Size: 307200 bytes #CompressLocalDatabase no
Size:  61725 bytes #CompressLocalDatabase yes

File: daily.cvd (Build time: 23 Feb 2012 Version: 14517 Signatures: 108276)
Size: 2536661 bytes #this one is the "old" one
File: daily.cvd (Build time: 24 Feb 2012 Version: 14521 Signatures: 108297)
Size: 2537124 bytes #this one is the "new" one
File: daily.cld (Build time: 24 Feb 2012 Version: 14521 Signatures: 108297)
Size: 6896640 bytes #CompressLocalDatabase no
Size: 2537124 bytes #CompressLocalDatabase yes

I could’nt explain the 137 bytes difference between the "native" bytecode.cvd and the "updated" bytecode.cld files, but the "native" daily.cvd and the "updated" daily.cld files were exactly the same size :-)


Last edited by tizef on Sat Mar 23, 2013 8:15 pm; edited 1 time in total
View user's profileSend private message
Re: main cld/cvd file size
blgd


Joined: 08 May 2007
Posts: 0
Reply with quote
tizef wrote:


1. CVD stands for "ClamAV Virus Database", native, compressed tarball ;
2. CLD stands for "ClamAV Local Database", updated, compressed or not.

References : http://lurker.clamav.net/message/20080708.170047.63f82e9e.en.html lurker.clamav.net, http://wiki.clamav.net/bin/view/Main/ScriptedUpdates wiki.clamav.net.

About the file sizes

I made my own little tests and it seemed pretty clear to me that the (case sensitive) option "CompressLocalDatabase" works fine.

1. With all (main, daily, bytecode) database files, but only ;
2. When the original file (cvd or cld) is already compressed.



Thanks for sharing your digs Smile

Maybe the above explains all as we were testing with updated ones and, therefore, uncompressed (or a mix of all, even what's been said in the thread). I'm downloading the compressed databases and see what happens with the new update.

At least daily, which grown to 6MB.
View user's profileSend private message
blgd


Joined: 08 May 2007
Posts: 0
Reply with quote
Ooooook, now is clear and there was my fault.

Dumb of me I was using the "program files\clamwin\bin\clamwin.conf" file, instead the one in (windows 2000 and XP) "documents and settings\user profile\application data\.clamwin\clamwin.conf" (Windows Vista and above, if I'm not wrong, as I don't use them "users\user profile\application data\.clamwin\clamwin.conf").

I didn't know that Clamwin uses and creates a new clamwin.conf on each profile used (!?!?!?) on a Windows System.

I noticed this when I didn't found the server set in the GUI in the bin\clamwin.conf file for one of my country. It was set in the file said above, inside the profile path.

But let me fix your message, tizef Wink. There is no need for the already existing clv/cld files in the db folder to be as compressed for the compression to work. I tested with both cases and the file was correctly recompressed/compressed (in either case) after download of the update.

So, long story short, the file to modify must be the clamwin.conf at your profile folder and the modification that must be made is to the freshclamparams option under [ClamAV] section as follows, without quotes, "freshclamparams = CompressLocalDatabase yes" (or appending it if you are using more parameters).

In my case, tonight, as the only update was to daily file, I can't tell more, but is supposed to work with every database file. I'll try to report when happens to others.

Regards.

P.S.: in my log window/file doesn't show the compression task, what debug level do you use?
View user's profileSend private message
tizef


Joined: 24 Feb 2012
Posts: 0
Location: France
Reply with quote
blgd wrote:
There is no need for the already existing clv/cld files in the db folder to be as compressed for the compression to work.

Well, at least let me say that under Windows 98 SE it has to be ;-)
View user's profileSend private message
blgd


Joined: 08 May 2007
Posts: 0
Reply with quote
tizef wrote:
blgd wrote:
There is no need for the already existing clv/cld files in the db folder to be as compressed for the compression to work.

Well, at least let me say that under Windows 98 SE it has to be Wink


Ok, I didn't know that Smile Different OSs, different behaviors Confused I think it shouldn't be as Clamwin is not part of it, but...

The final question (debug), is related to Win98 too? I set debug to 0 or 1 and it's the same under Windows 2000.
View user's profileSend private message
tizef


Joined: 24 Feb 2012
Posts: 0
Location: France
Reply with quote
blgd wrote:
Different OSs, different behaviors :-? I think it shouldn't be as Clamwin is not part of it, but...

I will try again next week to confirm that (or not). Only two dailies are needed.

blgd wrote:
The final question (debug), is related to Win98 too? I set debug to 0 or 1 and it's the same under Windows 2000.

Sorry. No debug mode, just a DIY log file-like based on the sigtool’s outputs :-)

Code:
# By default freshclam will keep the local databases (.cld) uncompressed to
# make their handling faster. With this option you can enable the compression;
# the change will take effect with the next database update.
# Default: no

Anyway, we should keep in mind that the database has to be uncompressed in memory each time ClamWin is launched (or even permanently if Clam Sentinel is used). Forcing the database compression may be pointless, don’t you think ? Now we have quite understood the way update works, let’s go back to the default configuration, which is certainly as smart as possible ;-)
View user's profileSend private message
blgd


Joined: 08 May 2007
Posts: 0
Reply with quote
Haha Smile

May be pointless, but it depends on preferences. For example, I don't use sentinel, if you mean by sentinel the clamtray utility to keep updated (as clamwin hasn't a resident scan). I do all manually Smile

I prefer to keep free space and wait for Clamwin to decompress databases every time you scan. In the last months, since when I started this thread, haven't been any main.cvd update, that is the biggest file, but, you know, let's be prepared for it Wink In my case and personal preferences, of course.

But you are right, now we know better how updates work and that's enough Smile

Here is left a bit of knowledge for those out there to decide Wink
View user's profileSend private message
tizef


Joined: 24 Feb 2012
Posts: 0
Location: France
Reply with quote
blgd wrote:
For example, I don't use sentinel, if you mean by sentinel the clamtray utility to keep updated (as clamwin hasn't a resident scan).

By Clam Sentinel I mean… Clam Sentinel. Keep it simple, stupid ;-)


Last edited by tizef on Sat Mar 23, 2013 8:16 pm; edited 1 time in total
View user's profileSend private message
tizef


Joined: 24 Feb 2012
Posts: 0
Location: France
Reply with quote
blgd wrote:
There is no need for the already existing clv/cld files in the db folder to be as compressed for the compression to work.

Well, now let me say that you were completely right. I should avoid nightly tests :-?

blgd wrote:
So, long story short, the file to modify must be the clamwin.conf at your profile folder and the modification that must be made is to the freshclamparams option under [ClamAV] section as follows, without quotes, "freshclamparams = CompressLocalDatabase yes" (or appending it if you are using more parameters).

What did you mean exactly by "appending it" ? I did several attempts, all of them failed to make ClamWin to pass more than one parameter to freshclam (e.g. LogTime yes and LogVerbose yes).

Code:
[ClamAV]
freshclamparams = C:\Windows\Application Data\.clamwin\FreshClam.conf

That one even prevented freshclam from starting !
View user's profileSend private message
blgd


Joined: 08 May 2007
Posts: 0
Reply with quote
tizef wrote:
blgd wrote:
There is no need for the already existing clv/cld files in the db folder to be as compressed for the compression to work.

Well, now let me say that you were completely right. I should avoid nightly tests Confused


For me worked the two ways: files compressed, files uncompressed. Under Windows 2000, at least.

tizef wrote:
blgd wrote:
So, long story short, the file to modify must be the clamwin.conf at your profile folder and the modification that must be made is to the freshclamparams option under [ClamAV] section as follows, without quotes, "freshclamparams = CompressLocalDatabase yes" (or appending it if you are using more parameters).


What did you mean exactly by "appending it" ? I did several attempts, all of them failed to make ClamWin to pass more than one parameter to freshclam (e.g. LogTime yes and LogVerbose yes).


My fault there then. I admit. I thought they could be appended :S Sorry, I said guessing that could be possible. I didn't really test. Maybe can be done by calling the freshclam.conf file (or other) via "--config-file" in freshclamparams. As there is no explanation anywhere...

tizef wrote:

Code:
[ClamAV]
freshclamparams = C:\Windows\Application Data\.clamwin\FreshClam.conf

That one even prevented freshclam from starting !


Maybe, as I pointed above

freshclamparams = --config-file="C:\Windows\Application Data\.clamwin\FreshClam.conf"

Testing.....

EDIT: no way Confused I don't know how it could be achieved Confused

even changing to

freshclamparams = config-file "C:\Windows\Application Data\.clamwin\FreshClam.conf"

I didn't test, or I did...:

freshclamparams = config-file="C:\Windows\Application Data\.clamwin\FreshClam.conf"
View user's profileSend private message
main cld/cvd file size
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 2 of 2  

  
  
 Reply to topic