Re: [WebDNA] Server load

This WebDNA talk-list message is from

2008


It keeps the original formatting.
numero = 100465
interpreted = N
texte = I've wondered some of the same things myself. Maybe in the new website, there can be some insights from the programmers as to which is the best approach. From my own reasoning, if I need a piece of data more than once, I set a text variable for it. If use chunk of code more than once, I make an include file. Sometimes I use one DB to handle everything, but in some cases, I have to split them into a few databases. It's not about size (in my case) but about how the sorting works out, and other factors like how I display results on the page. Terry >It's not the best time to open a thread like this since I'm leaving >for a week's vacation later today and may not follow the (hopefully >lively) discussion as closely as I'd like to. But this takes up so >much of my brain's processor capacity at the moment I just can't let >it rest. ;-) > >I've come to a point where I have to recode most of the WebDNA for >my sites. Almost all my code is written to be compact - that is to >require as little memory and as few databases as possible. That made >a lot of sense when I originally opened the sites - back in the old >days when disc space and RAM were expensive and WebDNA's cache could >only hold a limited number of databases. > >Today it's processor capacity that is the limiting factor so I need >to refocus my programming accordingly. The solution is of course to >split large databases into several smaller ones and to precompile >more of the content. > >The problem is that both these solutions increase the amount of raw >data in the databases. At some point this will increase rather then >reduce the server load and I have absolutely no idea where that >point is. > >I know there is no definite answer to this but does anybody have any >info about how far I should go? Even the vaguest suggestion would be >higly apreciated. > > >Here are a few of the issues I've run into the last few days: > >1. When is one big database better than several smaller ones? > Example: I currently have one database of recommended CDs shared >by several sites (all of them music related). Would it be better to >have one smaller database for each site? It would reduce file size >considerably but the *total* memory requirement would increase since >much of the data from the old big database would be duplicated in >several of the small ones. > >Obviously what is the best solution depends on how much of the >content has to be duplicated but is there a way to guesstimate at >which point one big database becomes better than a bunch of small >ones? > >--- > >2. When is [SEARCH] better than [LOOKUP]? > Example: >http://www.musicaviva.com/encyclopedia/display.html?phrase=waldzither >This page gets data from two different databases via [LOOKUP] >commands, one big (20+ MB) base for the main body and a much smaller >one (1-2 MB) for the page title. It wouldn't be too difficult to add >a page title field to the big database and get all the data from >there with a [SEACRH] context but is that a good idea? (I need the >small database for search results anyway but I don't *have* to use >it on this diplay page). > >--- > >3. Is it always better to set a variable than to recalculate value >each time it's needed? > Example: In a search results page like this: >http://www.musicaviva.com/encyclopedia/list.html?alpha=f >I need the index number for the last item three times. It's before >the [FOUNDITEMS] contect so I have to calculate it by adding the >number of entries listed to the startat value. Is it better to store >this value as a variable or to calculate it three times? > >The "next-previous" navigation links on the same page raise a >similar question. The code for it is rather long, includes quite a >lot of calculations and appears both at the top and the bottom of >the page. Should I store as a variable or include the code twice? > >--- > >4. Is it a good idea to use variables for static text that occurs >several times on the page? > > Back to the display page: >Example: http://www.musicaviva.com/encyclopedia/display.html?phrase=waldzither >The "back to top" links could easily be set as a variable. That >would mean more calculation work for the server but also less data >to handle. Will this increase or decrease the server load? (Unlike >the two examples above, there is no WebDNA in the text snippet >itself, just static html.) > >--- > >5. Does anybody know of a good file serving service? > I know this is a bit off topic but moving all the non-html/WebDNA >files to another server would of course help. Not much but every >little bit counts. Can anybody recommend such a pure file server >service? >What I need is: > + A fast and - even more important - reliable server > + Ftp access > + Subdomain names pointing to the file server > + File types: .gif, .jpg, .pdf, .mid, .kar, .mp3, .wav and .abc >(.kar is "karaoke," just midi files with embedded lyrics, .abc is a >text based music notation file format) > + automatic redirects to main site for anybody trying to browse >the file directories manually > >At the moment I have no idea how much disc space or bandwidth I need. > > >Frank Nordberg >http://www.musicaviva.com >http://stores.ebay.com/Nordbergs-Music-Store?refid=store > >--------------------------------------------------------- >This message is sent to you because you are subscribed to >the mailing list . >To unsubscribe, E-mail to: -- Terry Wilson | terry@terryfic.com | http://terryfic.com http://WhosComing.com - a simplified, affordable online reservation system http://TightJacket.com -- stylish protection for your laptop -------------------------------------------------------------------------- Attitude is the only difference between ordeal and adventure. Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Server load (Frank Nordberg 2008)
  2. Re: [WebDNA] Server load (Paul Willis 2008)
  3. Re: [WebDNA] Server load ("Brian B. Burton" 2008)
  4. Re: [WebDNA] Server load (Frank Nordberg 2008)
  5. Re: [WebDNA] Server load (Terry Wilson 2008)
  6. Re: [WebDNA] Server load (Patrick Junkroski 2008)
  7. Re: [WebDNA] Server load (Frank Nordberg 2008)
  8. Re: [WebDNA] Server load ("Brian B. Burton" 2008)
  9. [WebDNA] Server load (Frank Nordberg 2008)
I've wondered some of the same things myself. Maybe in the new website, there can be some insights from the programmers as to which is the best approach. From my own reasoning, if I need a piece of data more than once, I set a text variable for it. If use chunk of code more than once, I make an include file. Sometimes I use one DB to handle everything, but in some cases, I have to split them into a few databases. It's not about size (in my case) but about how the sorting works out, and other factors like how I display results on the page. Terry >It's not the best time to open a thread like this since I'm leaving >for a week's vacation later today and may not follow the (hopefully >lively) discussion as closely as I'd like to. But this takes up so >much of my brain's processor capacity at the moment I just can't let >it rest. ;-) > >I've come to a point where I have to recode most of the WebDNA for >my sites. Almost all my code is written to be compact - that is to >require as little memory and as few databases as possible. That made >a lot of sense when I originally opened the sites - back in the old >days when disc space and RAM were expensive and WebDNA's cache could >only hold a limited number of databases. > >Today it's processor capacity that is the limiting factor so I need >to refocus my programming accordingly. The solution is of course to >split large databases into several smaller ones and to precompile >more of the content. > >The problem is that both these solutions increase the amount of raw >data in the databases. At some point this will increase rather then >reduce the server load and I have absolutely no idea where that >point is. > >I know there is no definite answer to this but does anybody have any >info about how far I should go? Even the vaguest suggestion would be >higly apreciated. > > >Here are a few of the issues I've run into the last few days: > >1. When is one big database better than several smaller ones? > Example: I currently have one database of recommended CDs shared >by several sites (all of them music related). Would it be better to >have one smaller database for each site? It would reduce file size >considerably but the *total* memory requirement would increase since >much of the data from the old big database would be duplicated in >several of the small ones. > >Obviously what is the best solution depends on how much of the >content has to be duplicated but is there a way to guesstimate at >which point one big database becomes better than a bunch of small >ones? > >--- > >2. When is [search] better than [lookup]? > Example: >http://www.musicaviva.com/encyclopedia/display.html?phrase=waldzither >This page gets data from two different databases via [lookup] >commands, one big (20+ MB) base for the main body and a much smaller >one (1-2 MB) for the page title. It wouldn't be too difficult to add >a page title field to the big database and get all the data from >there with a [SEACRH] context but is that a good idea? (I need the >small database for search results anyway but I don't *have* to use >it on this diplay page). > >--- > >3. Is it always better to set a variable than to recalculate value >each time it's needed? > Example: In a search results page like this: >http://www.musicaviva.com/encyclopedia/list.html?alpha=f >I need the index number for the last item three times. It's before >the [founditems] contect so I have to calculate it by adding the >number of entries listed to the startat value. Is it better to store >this value as a variable or to calculate it three times? > >The "next-previous" navigation links on the same page raise a >similar question. The code for it is rather long, includes quite a >lot of calculations and appears both at the top and the bottom of >the page. Should I store as a variable or include the code twice? > >--- > >4. Is it a good idea to use variables for static text that occurs >several times on the page? > > Back to the display page: >Example: http://www.musicaviva.com/encyclopedia/display.html?phrase=waldzither >The "back to top" links could easily be set as a variable. That >would mean more calculation work for the server but also less data >to handle. Will this increase or decrease the server load? (Unlike >the two examples above, there is no WebDNA in the text snippet >itself, just static html.) > >--- > >5. Does anybody know of a good file serving service? > I know this is a bit off topic but moving all the non-html/WebDNA >files to another server would of course help. Not much but every >little bit counts. Can anybody recommend such a pure file server >service? >What I need is: > + A fast and - even more important - reliable server > + Ftp access > + Subdomain names pointing to the file server > + File types: .gif, .jpg, .pdf, .mid, .kar, .mp3, .wav and .abc >(.kar is "karaoke," just midi files with embedded lyrics, .abc is a >text based music notation file format) > + automatic redirects to main site for anybody trying to browse >the file directories manually > >At the moment I have no idea how much disc space or bandwidth I need. > > >Frank Nordberg >http://www.musicaviva.com >http://stores.ebay.com/Nordbergs-Music-Store?refid=store > >--------------------------------------------------------- >This message is sent to you because you are subscribed to >the mailing list . >To unsubscribe, E-mail to: -- Terry Wilson | terry@terryfic.com | http://terryfic.com http://WhosComing.com - a simplified, affordable online reservation system http://TightJacket.com -- stylish protection for your laptop -------------------------------------------------------------------------- Attitude is the only difference between ordeal and adventure. Terry Wilson

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Migrating to NT (1997) multi-paragraph fields (1997) [WebDNA] Crashing Database (2011) [GROUPS] followup (1997) Re[2]: 2nd WebCatalog2 Feature Request (1996) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) Database Security Rev., (2002) Can you help a newbie out? (2000) [CreateDate] tag? (1998) 2.0Beta Command Ref (can't find this instruction) (1997) Problem with empty form-variables in [search] (1998) WTB WEBDNA Version 4.5 for OS X (2003) Possible Bug in 2.0b15.acgi (1997) WebDNA integrated with Active Directory? (2004) Bug Report, maybe (1997) Help! WebCat2 bug (1997) Nesting format tags (1997) Nested tags count question (1997) Netscape 3.01 can't see db in form (1997) the comparison character \ (2000)