Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Add-ons for VP-ASP
 VPASP memory usage on server
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

augiem3
Starting Member

USA
12 Posts

Posted - July 16 2008 :  06:20:21  Show Profile  Reply with Quote
UPDATE: Workaround FOUND -- See my post about 7 messages down below...

How much memory (w3wp.exe process) does VPASP use normally for you guys? (On your server, provided it's Win2k3, open task manager, processes, and look at w3wp.exe)

When clicking from page to page on a default VPASP 6.50 plus install, I can max the w3wp.exe process to around 70 megs. Each page you click makes the process grow until you've clicked through all the possible pages on the default install. (I'm sure it would go even higher if I clicked through the admin pages too.)

I don't know if this is just ASP app behavior or if it's a problem with VPASP. It seems like it's CRAZY out of proportion for a shopping cart as many Windows VPS hosts limit you to 256 or 384 megs of memory. And then add a second cart directory and you're talking a boatload of memory.

A

Edited by - augiem3 on July 17 2008 15:41:50

augiem3
Starting Member

USA
12 Posts

Posted - July 16 2008 :  17:27:35  Show Profile  Reply with Quote
A little bit of new info:

The situation gets MUCH worse if I create another VPASP site using a seperate folder.

Navigating around the 1st site builds memory to a very large number. Then navigating around the 2nd site (in a seperate folder using the same database) builds the memory usage to about DOUBLE. So each instance of VPASP could consume up to hundreds of megs of memory in the application pool?? (I say hundreds because the memory usage DOES go up with each and every different *.asp page accessed -- including admin menus, etc.)

Is this just the way ASP applications work? Why is this info so hard to find on the web...
Go to Top of Page

augiem3
Starting Member

USA
12 Posts

Posted - July 16 2008 :  21:07:11  Show Profile  Reply with Quote
Okay MORE food for thought if anybody's reading this...

I boiled the problem down to Memory Template Caching (something ASP does to speed up processing) by setting up System Monitor and monitoring ALL Active Server Pages counters.

Template Caching explanation:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/a9171159-c801-4705-b8a9-9eecf58a892f.mspx?mfr=true

So here we go:
When an ASP page is accessed, IIS caches the whole of the source code, including ALL linked #include pages. The stupid thing is that even if the #include pages were already included by another ASP page previously accessed, THEY ARE CACHED AGAIN!

What does this mean? Every single ASP page that links to shop$db.asp and all the other #included pages are cached REDUNDANTLY! The settings for changing the ASP Memory Template Caching go by # of pages, NOT memory size. (Default is 500 pages in memory). It's not smart enough to dump previously cached pages when it runs out of memory apparently -- but it will supposedly dump previous pages when you hit the # of pages limit (500). Now it's only taking a dozen or so pages to hit 70 megs, so this is absolutely a big problem.

There also must be some CRAZY overhead. I created some test pages just to figure out how ASP was working. I created a 10MB asp file (just a ton of commented out code) just to see what would happen. Upon access, the App pool (w3wp.exe) explodes to 70MB. Seems stupid the Memory Template Cache is 7x bigger than the original ASP file...

With all that said, I see no solution to the problem. VPASP uses very large ASP script files that are #included by each and every .ASP file you access. This is going to make it nearly impossible to host more than one VPASP store on an affordable VPS system (HMS.com, 384MB memory). And my site design uses seperate .ASP pages for every content page linked to shop$db.asp so I can maintain login/session interface among all my pages. Once the number of pages increases in the future, the memory requirements to cache the pages after accessing them will bring any server to its knees...

Please give me some ideas.
Go to Top of Page

k-otic
Starting Member

49 Posts

Posted - July 16 2008 :  21:21:39  Show Profile  Reply with Quote
Most dynamic systems by their nature consume a reasonable chunk of memory, however you seem to be facing it to the extreme.

Have you checked this out?

http://support.microsoft.com/kb/916984

The situation seems to fit your setup and possibly applying the hotfix may solve the problem.

Go to Top of Page

augiem3
Starting Member

USA
12 Posts

Posted - July 16 2008 :  23:55:09  Show Profile  Reply with Quote
quote:

Have you checked this out?

http://support.microsoft.com/kb/916984

The situation seems to fit your setup and possibly applying the hotfix may solve the problem.



I did see that article, but both the web VPS and the VMware 2K3 Server I set up are on Service Pack 2, which that article seems to state as the fix to the problem...
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - July 17 2008 :  03:49:58  Show Profile  Reply with Quote
Hi,

you may want to take a look at this:

http://www.smartertools.com/forums/p/16716/44530.aspx

it also gives a link to a Microsoft support page which seemed to do the trick for a similar problem to yours

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

augiem3
Starting Member

USA
12 Posts

Posted - July 17 2008 :  12:57:31  Show Profile  Reply with Quote
quote:
Originally posted by carfin

you may want to take a look at this:

http://www.smartertools.com/forums/p/16716/44530.aspx

it also gives a link to a Microsoft support page which seemed to do the trick for a similar problem to yours



I did see this before. I thought this would work as well but it didn't. I implemented the changes and I did see a drop in memory usage for Smarter Mail when logging in through IIS compared to the built-in service.

On my VMWare testing server, I've only got 1 processor, so it doesn't really apply to that situation. The VPS does have 4 procs, but adding the line didn't reduce the memory footprint of VPASP at all.

My next attempt will be to completely get rid of Memory Template Caching by setting the max pages to cache to 1. We'll see if that helps. I'm sure the processor load is going to be very high if too many people are online though, not to mention pages will probably load quite slowly....
Go to Top of Page

augiem3
Starting Member

USA
12 Posts

Posted - July 17 2008 :  15:38:24  Show Profile  Reply with Quote
PROBLEM SOLVED (sort of)

It was caching too many pages in memory, which wouldn't be a problem if each page wasn't so big.

Here's the workaround:
Open IIS
Right click on "Web Sites" -> Properties
Click "Home Directory" tab, click "Configuration"
Click "Cache Options" tab
Set "Cache limited ASP files in memory" to "5"
Set "Cache limited ASP files on disk" to whatever your disk has space for (default to 2000)

Now IIS will cache pages to disk, not to precious memory! Strangely, the cached pages on disk are WAYYYY smaller than the amount of memory they take to be cached in memory. Example: My 10MB test file full of commented stuff takes 70MB in memory cache. On disk cache, it only takes like 800KB.

Now the 5 in-memory pages will be will dumped to disk as you navigate around and VPASP is staying within 35MB or so of memory!!!!

PHEW! This was a TOUGH nut to crack, I'll tell you. I hope this helps someone else out there!

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00