Answer in the text :
On Thu, Dec 1, 2011 at 4:05 PM, KMax <[email protected]> wrote:
> How you have tested the load?
>
~15 users accessing the app and simulating their work...
> What is your CPU/RAM ?
>
Intel(R) core 2 CPU E7500 2.93GHz / ram 2 gig
> How did you configure tread/process of wsgi ?
>
noting fancy what come with ubuntu and web2py ubuntu setup script
>
> I have a case when all slow down was on .first() or .last() ofter db
> was populated
>
I use .first() a lot for getting db row value to know if user has acces or
not to a record...
Ex.:
def update():
...
elif auth.has_membership(auth.id_group('data_entry_person')) \
and db(db[request.args(0)].id==request.args[1]).\
select(db[request.args(0)].reviewed).first().reviewed!=True\
and db(db[request.args(0)].id==request.args[1]).\
select(db[request.args(0)].approved).first().approved!=True:
db[request.args(0)].FIELDS.writable=\
db[request.args(0)].FIELDS.readable=False *# here I hide thing
depend of the user group*
form=SQLFORM(db[request.args(0)],
request.args[1],
deletable=False,
formstyle=formstyle,
upload=URL('download'))
My read and select function follow the same path also...
Richard
> On 1 дек, 22:44, Richard Vézina <[email protected]> wrote:
> > Use top, iotop, itop and screen so I can switch between those top...
> >
> > I tried what preibt suggest on other thread (same thread double post one
> > without object) and replace Apache and wsgi by nginx and uwsgi... No much
> > difference and still the 45% 100%... But it sometime goes over 45%. For
> > those second test I had a dev virtual machine with 2 cpu (only have 1 cpu
> > the first time on staging vm).
> >
> > I read the scale section in the book and there is many thing I can try...
> > For now I will try to refactor my app since it seems to come from there.
> I
> > have long models and controller files so I will try to split them off a
> bit
> > to see if I can improve speed this way.
> >
> > Thanks for help Chris!
> >
> > Richard
> >
> > On Wed, Nov 30, 2011 at 10:27 PM, Christopher Steel
> > <[email protected]>wrote:
> >
> >
> >
> >
> >
> >
> >
> > > That sound peculiar Richard. Could we get a little more info on your
> load
> > > test? Where are you getting the 45% and 100% figures from, the Gnome
> > > monitoring applet? If it is an app you can share, I could try the same
> > > setup on a similar system for you.
> >
> > > Chris
>