Memory Usage

Please post any questions regarding the program here.

Moderator: 2020vision

Memory Usage

Postby Yorkie » Mon Jul 06, 2009 10:21 am

Hi all.

Currently i have 32 markets running in BA linked to 32 worksheets within a single workbook, yes i know it's a lot. When i first open BA and load everything up, including the first market in the quick pick list BA is using around 185mb of memory. After a while this grows to 400 and sometimes above 600mb. This is before any of the races have actually started. The worksheets are coded to run the -6 refresh every minute and have a normal refresh of 5 seconds until close to race time. Once the memory has climbed it can take over a minute for the -6 refresh to finish by which time it's running it again.

Can someone explain why the memory usage grows as it does when it "appears" that BA is doing very little more than it was when it was loaded?

This is not a complaint btw, just wondering.

Thanks
Yorkie
 
Posts: 116
Joined: Wed Feb 25, 2009 1:04 pm

Postby GaryRussell » Mon Jul 06, 2009 10:29 am

Sorry I can't give you a quick answer to that. I'll have to investigate and get back to you.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby clinton » Mon Jul 06, 2009 10:31 am

My experience is that its better for memory usage using many workbooks whit a a small number of sheets each one.
I open 18 workbooks with a single sheet each one, and that works really better then before...
Hope this can help u
clinton
 
Posts: 111
Joined: Mon Oct 22, 2007 12:25 pm

Postby Yorkie » Mon Jul 06, 2009 10:41 am

If that cuts down the memory usage then i'm happy to do it that way. I have just started a weeks trial with tagadab on their VS500 virtual server. With BA using 185mb that's fine but with 600mb it means i would need the VS1000, obviously costing more, hence why finding out why memory usage climbs as it does is a good thing.
Yorkie
 
Posts: 116
Joined: Wed Feb 25, 2009 1:04 pm

Postby dgs2001 » Mon Jul 06, 2009 7:24 pm

Yorkie,

I'm not expert at these things, but check your vba code for uneccessary variables being stored, try to release them all at the end of each macro, also try to ensure it reads smoothly without jumping all over the place. This will help generally with speed. A good rule to follow is one in one out meaning you should only start or enter a macro at the begining, and you should only leave or exit you code from that same macro, after its run.

If you have 32 worksheets all with the same routines excel can get confused by the repeated use of the same variables, especially if any are declared as static or public. Putting them in seperate workbooks, as suggested seems to help excel keep track better.

I sometimes when writing new vba end up with an out of memory error, this follows similar slowing down to that which you are seeing now.

Duncan
User avatar
dgs2001
 
Posts: 334
Joined: Thu Apr 05, 2007 4:53 pm
Location: The Home Of National Hunt

Postby Yorkie » Mon Jul 20, 2009 7:20 pm

Still having trouble with this. I've removed all VBA from the sheets, split them into multiple workbooks but i'm still having memory problems.

If i load everything up in a morning it's fine all day (without the -6 refresh) but once racing has finished that's when it seems to be a problem.
I've tried loading the next days races in the night before and leaving it to load the first race the following day, i've loaded the races in the night before and also picked the first race manually, i've left it and tried to load the races the next day and still no good.
It's running on tagadab VS500. Now if the answer is not enough memory then fine but the fact it runs all day, while the races are on, suggests that isn't the case. By the next morning BA can be showing 20,000 hard faults ( I know they are not really faults) in resource monitor. If it's a problem with windows server 2008 then again at least i know.

The spreadsheet below shows the figures for a 24hr period taken from the resource monitor. These are roughly replicated each day.

http://www.mp3yorkiesplace.com/downloads/ba_memory_data.xlsx

Can you take a look please Gary and see if it's what you would expect when using around 30 tabs. What happens when racing is over to make the memory usage climb? When i come to it in the morning i can move between excel sheets but most times can't even get BA to maximise on the screen and end up having to close it with task manager, even if i've closed excel first.

Hope you can shed some light.

Yorkie
Yorkie
 
Posts: 116
Joined: Wed Feb 25, 2009 1:04 pm

Postby GaryRussell » Sat Jul 25, 2009 11:09 am

I am still looking into this.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby Yorkie » Sat Jul 25, 2009 2:17 pm

Thanks Gary
Yorkie
 
Posts: 116
Joined: Wed Feb 25, 2009 1:04 pm

Postby GaryRussell » Mon Jul 27, 2009 12:38 pm

I found something today which may well be the problem. I am working on a fix and will let you know when it's ready.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby GaryRussell » Sat Aug 01, 2009 2:01 pm

Can you try the latest build of pre-release version 1.1.0.63. I have added an option to preferences/general to limit the amount of data it can store for the charts. Try setting it to 1 hour. I have also plugged some memory leaks.

Download from http://www.gruss-software.co.uk/Betting ... _Beta1.msi
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby Yorkie » Sat Aug 01, 2009 2:33 pm

Cheers Gary, i'll install it after todays races and see how we go.
Yorkie
 
Posts: 116
Joined: Wed Feb 25, 2009 1:04 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 31 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.