Author Topic: Memory Size  (Read 13161 times)

0 Members and 1 Guest are viewing this topic.

Raptor

  • Guest
Memory Size
« on: February 06, 2003, 08:13:31 PM »
I really love your product, but would it be possible to cut down the memory requirements?
Currently the Resident Scanner takes up to 40mb Ram, which is way too much for a service! I've got plenty of memory left, but I'm the typical Unix user, which gets a headache seeing this ;)

Otherwise: keep up the really good work!

Pavel Baudis

  • Guest
Re:Memory Size
« Reply #1 on: February 06, 2003, 09:30:35 PM »
Quote
Currently the Resident Scanner takes up to 40mb Ram
No, it is not true :-)

Here are the words from Vlk, who is currently offline:
Quote
I'd like to comment on the memory consumption of avast 4.

I was pretty surprised how much emphasis you guys put to the 'Mem Usage' column in the Task Manager. I'm not saying it's totally pointless to look at this columnn, but the truth is that it *is* highly inaccurate, and in special cases it can be totally bogus. For more information, I recommend a good book on the topic, like 'Inside Windows 2000' from David Solomon and Mark Russinovich.

If you'd like to know how much virtual memory an app is taking, it's much more sensible to use the 'VM Size' column (it's not shown by default, but you can enable it in the View menu).

If you sum up all 4 avast resident processes' VM Size values, you get something like 12MB - not little, but imho definitely not a memory hog (not 39MB!!!).
See  ;) ? Let's continue:

Quote
There are two values. Actually, their names are very misleading - in fact these two guys correspond to the 'Private Bytes' (the VM Size) and 'Working Set' (the Mem Usage) NT performance counters.

This is what MS says about these values:

Private Bytes (Task Manager's "VM Size"):
"Private Bytes is the current size, in bytes, of memory that this process has allocated that cannot be shared with other processes."

In other words, this is the memory the program has allocated (therefore, this is quite reasonable value to compare, and it normally does not fluctuate much)

Working set (Task Manager's "Mem Usage"):
"Working Set is the current size, in bytes, of the Working Set of this process. The Working Set is the set of memory pages touched recently by the threads in the process. If free memory in the computer is above a threshold, pages are left in the Working Set of a process even if they are not in use.  When free memory falls below a threshold, pages are trimmed from Working Sets. If they are needed they will then be soft-faulted back into the Working Set before leaving main memory."

In my opinion, this value really has a meaning only to the developers. It's totally useless for the end user as it is trivial to make an application that e.g. allocates a single page (e.g. 4K) and still has a working set of, let's say 400MB - just by mapping this single page 100,000 times, which is perfectly legal (and in fact, this is, roughly said, what avast 4 is really doing - not 100,000 times, but let's say, 10 times, but that's a detail - the point is that this has nothing to do with real 'memory consumption', just 'address space consumption')...

There are programmatic ways how to artificially lower the Working Set value, and there are programs that use these techniques, but we find it stupid to use them just to make users think that our application is taking less memory than it's actually taking, not to mention the fact that tampering with the working set can have severe performance consequences...
Hope this will help to explain things a little bit!

Pavel

Raptor

  • Guest
Re:Memory Size
« Reply #2 on: February 06, 2003, 10:24:51 PM »
Damn it, you got me there!
I didn't notice the default setting of the task manager, i'm used to the correct displays of ps and top :D

thx again for getting that straight, and i found some other memory hogs, (a 4mb prog which actually uses 20mb...)

PS: that's what i call fast and good support ;)

Vincent

  • Guest
Re:Memory Size
« Reply #3 on: June 08, 2003, 08:20:36 PM »
Hi,

I'm a brand new user of avast, so maybe I'm totally wrong but I have somehow the same concern Raptor mentionned: if I sum up all the 4 processes of avast, I reach 30Mb which is in my opinion very high (I'm talking about VM sizes as suggested, but these are even bigger than "Memory usages"...)

Any clue about that ?

Offline Vlk

  • Avast CEO
  • Serious Graphoman
  • *
  • Posts: 11655
  • Please don't send me IM's. Email only. Thx.
    • ALWIL Software
Re:Memory Size
« Reply #4 on: June 09, 2003, 09:56:40 AM »
Well, yes, that is true, but see Pavel's post above - what it says is that the "Memory Size" column in the Task Manager is in fact misleading - it's much more sensible to check the "VM Size" column instead...

Vlk
If at first you don't succeed, then skydiving's not for you.

RobNyc

  • Guest
Re:Memory Size
« Reply #5 on: July 09, 2003, 05:34:57 PM »
I consume 25,108k of memory (25mb) in total on my celeron 633mhz 256sdram

ashDisp.eve 3,696k
ashMaiSv.exe 5,292k
ashServ.exe 15,016k
aswUpdSv.exe 1,104k

mantra

  • Guest
Re:Memory Size
« Reply #6 on: July 09, 2003, 07:17:01 PM »
yes RobNyc
to me is the same..!

is toooo much if i compare to NOD32,or f-prot,kaspersky or drweb!!!!!!!!!!!!!!!!!!!!!!!

jdong

  • Guest
Re:Memory Size
« Reply #7 on: July 09, 2003, 08:39:46 PM »
Oh, I see... Never knew the difference between VM size and Mem usage...

that brings F-Secure's RAM usage from 30MB to 10MB  :)

(don't shoot -- I still use Avast on my old computer :) :) )

And once 5.0's here, I'll most likely switch my primary PC over, too (unpackers matter a lot to me)

RobNyc

  • Guest
Re:Memory Size
« Reply #8 on: July 09, 2003, 10:49:30 PM »
Avast uses too much resources to compare to Dr.Web, Nod32, AVG 6 & 7(That just came out), and it even uses more than Kaspersky too. Now Norton(second biggest), McAfee(the biggest hogger), PC-Cillin, and a few others no need to mention are way out of the line for us slow pc users. I know Norton has its power but it has its weakness, McAfee not a fan, etc. Just cuz they use a lot of resource dont mean they powerful.

Curchulain

  • Guest
Re:Memory Size
« Reply #9 on: March 08, 2004, 01:20:46 AM »
I'm not using the Windows Task Manager, but FreshDevices' FreshDiagnose and what it's telling me doesn't really look like the 12 Mb Avast is supposed to use. Oh and it shows only two processes with a total of 32 threads

ASHMAISV.EXE:
heap size 9.02 Mb
module size 15.64 Mb
thread count 6

ASHSERV.EXE
heap size 241.80Mb (heap 12 is accounting for 218.76 Mb)
module size 19.07 Mb
thread count 26

added up that's 285.53 Mb, or over 270 Mb more than it is supposed to be

What's going wrong here? Sometimes I can't even listen to an MP3 and click a browser link at the same time or the MP3 will start stuttering. Help would be greatly appreciated.

Grtz,
Corné

Avast! 4.1.357 with VPS 0403-2
Windows 98
512Mb of RAM

Offline igor

  • Avast team
  • Serious Graphoman
  • *
  • Posts: 11867
    • AVAST Software
Re:Memory Size
« Reply #10 on: March 08, 2004, 09:57:18 AM »
Wov, 240 megs in ashserv.exe? That's certainly a lot.
Does it look like this every time, or was it just this one time? Does it look like this right from the start of Windows, or is the value continualy growing?

Did you make any changes to the resident protection settings (e.g. regarding the scanning of archvies)? Did you scan some big(?) archives previously?

Curchulain

  • Guest
Re:Memory Size
« Reply #11 on: March 08, 2004, 11:26:54 AM »
Wov, 240 megs in ashserv.exe? That's certainly a lot.
Does it look like this every time, or was it just this one time? Does it look like this right from the start of Windows, or is the value continualy growing?

Did you make any changes to the resident protection settings (e.g. regarding the scanning of archvies)? Did you scan some big(?) archives previously?
I checked back just this morning and at the start of Windows it was now a total of 297MB for ashserv.exe.
I haven't changed anything in the settings for resident protection, at least not that I know of. I have used some big archives that may have been scanned upon opening, but that was 1.3 GB unzipped, 700 MB zipped... and it was after I noticed my comp was starting to slow down. I've tried emptying the virus chest but that was only a few MB's of Swen and MyDoom.

Any suggestions? Cache, folders, settings, anything?

Grtz,
Corné

Offline igor

  • Avast team
  • Serious Graphoman
  • *
  • Posts: 11867
    • AVAST Software
Re:Memory Size
« Reply #12 on: March 08, 2004, 12:43:05 PM »
I think the problem is in the "interpretation" of the values.
Some heaps are allocated with "maximum size limit" - however, the diagnostic tool considers the limit to be the size of memory that is commited - which is not true.

I have a Win98SE system here, with 128MB of RAM. When I check the system status right after start, I can see: 58MB Unused Physical Memory, 24MB Disk Cache Size, the swap file is 0 bytes long.
Heap Size reported by FreshDiagnoze for ashServ.exe is 110MB... which somehow doesn't fit the numbers above. I'm not saying it's the fault of FreshDiagnoze - I'm using a tool called ATM and it reports similar numbers. Just the "allocated" heap doesn't necessarily mean the memory is really used (commited).

faffy

  • Guest
Re:Memory Size
« Reply #13 on: March 08, 2004, 03:10:34 PM »
I think people put too much emphasis on memory usage of the programs. I do not care how much memory a program uses. What I care most about is that I don't want to notice performance difference when I am using my computer wiht or without antivirus. That's why I could never  use KAV or Norton. They make my computer very slow.

In this regard, I find avast! very good. Sometimes I notice a slow down in hard disk access, but  it is not disturbing.

Faffy

Curchulain

  • Guest
Re:Memory Size
« Reply #14 on: March 08, 2004, 05:27:24 PM »
I do notice a decrease in performance so now I do care about which programs are mem hogs. I don't think nearly 300 megs is really the amount of memory an AV program would/should allocate in anticipation of things to come. With avast claiming over 300 megs of the 380 megs currently in use, I'm very concerned about more loss of performance once I start any program heavier than my browser (Opera) or my MP3 player.