Hello there all, i have one page that uses periodically_call_remote to update about 65 divs on this page every 5 minutes or so. The page also uses a rather large background map. the server we are using has 4 cpu at 2ghz, 8meg RAM and 5 disc RAID 5. our connection is 1.5 meg upload. we seem to really get bogged down on high traffic times. I have watched gkrellm, and it doesn''t seem to be the processors or RAM that is limiting anything. Other php sites hosted on the main server here (virtual hosts in apache) also slow down considerably. i am using rails in production mode, fastcgi. What kind of tool would you guys reccomend that i use to determine what my bottleneck is ? could it be disc? i have tried to optimize my tables and indexes, but can''t really tell what our limiting factor to speed things up here is. Is ajax expensive on the server? thanks for any tips. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hello there all, i have one page that uses periodically_call_remote to update about 65 divs on this page every 5 minutes or so. The page also uses a rather large background map. the server we are using has 4 cpu at 2ghz, 8meg RAM and 5 disc RAID 5. our connection is 1.5 meg upload. we seem to really get bogged down on high traffic times. I have watched gkrellm, and it doesn''t seem to be the processors or RAM that is limiting anything. Other php sites hosted on the main server here (virtual hosts in apache) also slow down considerably. i am using rails in production mode, fastcgi. What kind of tool would you guys reccomend that i use to determine what my bottleneck is ? could it be disc? i have tried to optimize my tables and indexes, but can''t really tell what our limiting factor to speed things up here is. Is ajax expensive on the server? thanks for any tips. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Have you considered the HTTP pipeline? Updating 65 divs with one rjs request might be ok but if you are using periodically_call_remote to update each div individually, you could be generating 65 individual requests. If that''s the case, then once you run out of capability to serve the Rails requests, the next ones queue up until one of the fcgi''s frees up. Ajax is inherently cheaper than page reloading, but potentially generates more request/response loops. Could this be it? On Jun 11, 2007, at 9:29 AM, nephish wrote:> > Hello there all, > > i have one page that uses periodically_call_remote to update about 65 > divs on this page every 5 minutes or so. The page also uses a rather > large background map. > > the server we are using has 4 cpu at 2ghz, 8meg RAM and 5 disc RAID 5. > our connection is 1.5 meg upload. > > we seem to really get bogged down on high traffic times. I have > watched gkrellm, and it doesn''t seem to be the processors or RAM that > is limiting anything. > > Other php sites hosted on the main server here (virtual hosts in > apache) also slow down considerably. > > i am using rails in production mode, fastcgi. > > What kind of tool would you guys reccomend that i use to determine > what my bottleneck is ? > > could it be disc? i have tried to optimize my tables and indexes, but > can''t really tell what our limiting factor to speed things up here is. > > Is ajax expensive on the server? > > thanks for any tips. > > > >Steve Ross sross-ju+vs0qJmyeQKKlA4PA9hA@public.gmane.org http://www.calicowebdev.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jun 11, 11:40 am, "s.ross" <cwdi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Have you considered the HTTP pipeline? Updating 65 divs with one rjs > request might be ok but if you are using periodically_call_remote to > update each div individually, you could be generating 65 individual > requests. If that''s the case, then once you run out of capability to > serve the Rails requests, the next ones queue up until one of the > fcgi''s frees up. > > Ajax is inherently cheaper than page reloading, but potentially > generates more request/response loops. > > Could this be it? > > On Jun 11, 2007, at 9:29 AM, nephish wrote: > > > > > > > Hello there all, > > > i have one page that uses periodically_call_remote to update about 65 > > divs on this page every 5 minutes or so. The page also uses a rather > > large background map. > > > the server we are using has 4 cpu at 2ghz, 8meg RAM and 5 disc RAID 5. > > our connection is 1.5 meg upload. > > > we seem to really get bogged down on high traffic times. I have > > watched gkrellm, and it doesn''t seem to be the processors or RAM that > > is limiting anything. > > > Other php sites hosted on the main server here (virtual hosts in > > apache) also slow down considerably. > > > i am using rails in production mode, fastcgi. > > > What kind of tool would you guys reccomend that i use to determine > > what my bottleneck is ? > > > could it be disc? i have tried to optimize my tables and indexes, but > > can''t really tell what our limiting factor to speed things up here is. > > > Is ajax expensive on the server? > > > thanks for any tips. > > Steve Ross > s...-ju+vs0qJmyeQKKlA4PA9hBHnuRYL88vP@public.gmane.org://www.calicowebdev.comthis very well could be, would it be cheaper to use one ajax call to remote to update several div tags at once ? is this even possible? this would also explain why other stuff takes longer to load with a hi traffic time, stuff that is not fcgi. thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> this very well could be, would it be cheaper to use one ajax call to > remote to update several div tags at once ?Considerably cheaper - maybe well in excess of 65 times as cheap depending on the time it takes for the request to be served. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jun 11, 2:32 pm, Matt <m...-5JC3FsxXPsVpLGFMi4vTTA@public.gmane.org> wrote:> > this very well could be, would it be cheaper to use one ajax call to > > remote to update several div tags at once ? > > Considerably cheaper - maybe well in excess of 65 times as cheap > depending on the time it takes for the request to be served.thanks looking up how to pull that off. shawn --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> thanks looking up how to pull that off. > shawnIf the elements are all in a block, you could just render the whole block in one go. Otherwise you could use RJS with inline partials --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
shawn bright
2007-Jun-11 20:00 UTC
Re: need to find a bottleneck when traffic is kinda high
well, the elements are scattered over a map, each one is an absolutely positioned pin on a map that shows the amount of rain that that location received. We update the totals every 5 minutes so folk can actually watch it rain. could i put all of these inside something like a <div> and update them all. also, each little div has one tiny image, is it also sending all of those, even if they are the same ? Or would the browser cache them ? here is what i am talking about www.texaspivot.com/pivrain On 6/11/07, Matt <matt-5JC3FsxXPsVpLGFMi4vTTA@public.gmane.org> wrote:> > > > thanks looking up how to pull that off. > > shawn > > If the elements are all in a block, you could just render the whole > block in one go. > Otherwise you could use RJS with inline partials > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> could i put all of these inside > something like a <div> and update them all.Yep - thats the easiest way> also, each little div has one tiny image, is it also sending all of those, > even if they are the same ? Or would the browser cache them ?Browser should cache them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> here is what i am talking aboutwww.texaspivot.com/pivrainThat has to be the most bizarre idea for a website I have ever seen - amazing the applications for technology that you just dont think about until someone else has done it. I would assume that you dont get much rain in texas, hence the need to ensure that the sprinklers are doing their job? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
shawn bright
2007-Jun-11 22:15 UTC
Re: need to find a bottleneck when traffic is kinda high
indeed, we are a couple of inches / year from being a desert out here. thanks for all of your help, you can see, the high traffic time is when it rains. our site gets flooded with traffic, when not, folk just log in to check their sprinklers. with gas prices so high, to run a pivot on a 1/4 mile circle field of corn can be $500 / day. so if it rains about an inch and a half, guys can shut off their sprinklers for a few days. If you are farming 15 circles, you save a ton of money every time it gets wet outside. Besides all that, Matt, thanks for all your help. I will try to have the changes in place before the next rain. All the farmers here are praying for one soon. cheers ! shawn On 6/11/07, Matt <matt-5JC3FsxXPsVpLGFMi4vTTA@public.gmane.org> wrote:> > > > here is what i am talking aboutwww.texaspivot.com/pivrain > > That has to be the most bizarre idea for a website I have ever seen - > amazing the applications for technology that you just dont think about > until someone else has done it. > I would assume that you dont get much rain in texas, hence the need to > ensure that the sprinklers are doing their job? > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jun 11, 11:15 pm, "shawn bright" <neph...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> indeed, we are a couple of inches / year from being a desert out here. > thanks for all of your help, you can see, the high traffic time is when it > rains. our site gets > flooded with traffic, when not, folk just log in to check their sprinklers. > > with gas prices so high, to run a pivot on a 1/4 mile circle field of corn > can be $500 / day. > so if it rains about an inch and a half, guys can shut off their sprinklers > for a few days. If you are > farming 15 circles, you save a ton of money every time it gets wet outside. > > Besides all that, Matt, thanks for all your help. I will try to have the > changes in place before the next rain. All the farmers here are praying for > one soon. > > cheers ! > > shawnYour welcome - if you need any help, let me know --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Slightly OT, but why not use Google Maps for this? They provide some great tools for map overlays: you can feed a whole set of data as a GMarkerGroup and reload your map data in one swoop. --Andrew Vit On Jun 11, 1:00 pm, "shawn bright" <neph...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> well, the elements are scattered over a map, each one is an absolutely > positioned pin on a map that shows the > amount of rain that that location received. We update the totals every 5 > minutes so folk can actually watch it rain. could i put all of these inside > something like a <div> and update them all. > also, each little div has one tiny image, is it also sending all of those, > even if they are the same ? Or would the browser cache them ? > > here is what i am talking aboutwww.texaspivot.com/pivrain > > On 6/11/07, Matt <m...-5JC3FsxXPsVpLGFMi4vTTA@public.gmane.org> wrote: > > > > > > thanks looking up how to pull that off. > > > shawn > > > If the elements are all in a block, you could just render the whole > > block in one go. > > Otherwise you could use RJS with inline partials--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
shawn bright
2007-Jun-12 14:27 UTC
Re: need to find a bottleneck when traffic is kinda high
That is an idea i had earlier, we built the first version of this tool over a year ago, in php. when i began learning rails, i moved all of our web end to rails and translated it. When we first started, i did not even know google had an api for something like this, but i am very excited to do that when i get caught up with some of the other stuff we have to do. by the way, i have the new code in place, and forcast is for light rain tonight. We will see how she does, thanks again. shawn On 6/12/07, werdnativ <andrew-b/8mNwo5Adw@public.gmane.org> wrote:> > > Slightly OT, but why not use Google Maps for this? They provide some > great tools for map overlays: you can feed a whole set of data as a > GMarkerGroup and reload your map data in one swoop. > > --Andrew Vit > > > On Jun 11, 1:00 pm, "shawn bright" <neph...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > well, the elements are scattered over a map, each one is an absolutely > > positioned pin on a map that shows the > > amount of rain that that location received. We update the totals every 5 > > minutes so folk can actually watch it rain. could i put all of these > inside > > something like a <div> and update them all. > > also, each little div has one tiny image, is it also sending all of > those, > > even if they are the same ? Or would the browser cache them ? > > > > here is what i am talking aboutwww.texaspivot.com/pivrain > > > > On 6/11/07, Matt <m...-5JC3FsxXPsVpLGFMi4vTTA@public.gmane.org> wrote: > > > > > > > > > > thanks looking up how to pull that off. > > > > shawn > > > > > If the elements are all in a block, you could just render the whole > > > block in one go. > > > Otherwise you could use RJS with inline partials > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---