Telegram_2020-07-22T06

<< Click to Display Table of Contents >>

Navigation:  Telegram > 2020 > 07 > 22 >

Telegram_2020-07-22T06

Telegram link

 

2020-07-22T06:00:58

 

if 9 s is the best possible performance (When computer is idle) and you have a multi core computer (which most are, unless it is a singe-core VM), 4 users should take approximately the same 9 s, if you have 4 cores (unless you are sharing some stuff or serializing access to a common resource)

 


 

Telegram link

 

2020-07-22T06:02:54

 

of course, multi-threading is not 100% perfect in any language (there are always atomic operations, critical sections and such, and memory manager doesn't scale linearly), but more than double of the time from 1 user to 5 users tells me that lots of stuff are being serialized

 


 

Telegram link

 

2020-07-22T06:07:35

 

It is is production web site , user login and check their event result

 


 

Telegram link

 

2020-07-22T06:08:01

 

I use cpu i7 , 4 core , 32G ram server

 


 

Telegram link

 

2020-07-22T06:08:44

 

Then a testing client use chromium to simulate a user login and click those link and button

 


 

Telegram link

 

2020-07-22T06:11:59

 

What is mean by serialized ?as I trying finding the bottleneck on that performance

 


 

Telegram link

 

2020-07-22T06:13:04

 

Can I have real example / recommendation on how to handle high loading case ?

 


 

Telegram link

 

2020-07-22T06:13:19

 

What does the user login do?

 


 

Telegram link

 

2020-07-22T06:14:12

 

Query db check pasword, query event show a list and then select specific event show the ranking

 


 

Telegram link

 

2020-07-22T06:15:18

 

are you connecting/disconnecting to the DB server? What's the DB access layer?

 


 

Telegram link

 

2020-07-22T06:16:42

 

Sometimes you can use a DB connection pool. When application starts you create your pool with

 

\ number of active DB connections and use them when needed. it is a little more complicated than using a dedicated connection per user

 


 

Telegram link

 

2020-07-22T06:18:46

 

The point here is to find out why you spend 9 seconds to login a single user and it jumps to 19 seconds if you have 5 users...

 

IntraWeb is more than capable to handle 5 users in parallel with no performance penalty.

 


 

Telegram link

 

2020-07-22T06:19:20

 

I think 9 seconds for a single user is too high. What's the time you get in your dev machine?

 


 

Telegram link

 

2020-07-22T06:19:43

 

It is not a single function

 


 

Telegram link

 

2020-07-22T06:19:56

 

It is across few pages

 


 

Telegram link

 

2020-07-22T06:20:11

 

User login click a few link to go different page

 


 

Telegram link

 

2020-07-22T06:21:26

 

My db layers is using type: link www.remobjects.com , data abstract

 


 

Telegram link

 

2020-07-22T06:21:40

 

The db already In pool

 


 

Telegram link

 

2020-07-22T06:22:35

 

so there is a RO application server involved?

 


 

Telegram link

 

2020-07-22T06:22:41

 

Yes

 


 

Telegram link

 

2020-07-22T06:23:08

 

and how to you know that the 9 seconds is being spent in IW and not in RO server?

 


 

Telegram link

 

2020-07-22T06:24:06

 

Good question , I can try to log this time and check

 


 

Telegram link

 

2020-07-22T06:24:18

 

So that I know how much involve in RO

 


 

Telegram link

 

2020-07-22T06:24:37

 

but I tried in RO over 50 concurrent session

 


 

Telegram link

 

2020-07-22T06:24:42

 

That's a good start.

 


 

Telegram link

 

2020-07-22T06:24:49

 

It won’t have any problem

 


 

Telegram link

 

2020-07-22T06:25:05

 

As the RO server I server many user in app and pc system

 


 

Telegram link

 

2020-07-22T06:25:12

 

Just one of it for intraweb

 


 

Telegram link

 

2020-07-22T06:25:21

 

what type of connection do you have from IW to RO?

 


 

Telegram link

 

2020-07-22T06:25:34

 

and protocol

 


 

Telegram link

 

2020-07-22T06:26:42

 

tcp/ip Indy bin message

 


 

Telegram link

 

2020-07-22T06:29:38

 

so you have 1 RO channel for each IW user session?

 

Where do you put your RO channel? Is it connected all the time? Do you connect/disconnect it as needed?

 


 

Telegram link

 

2020-07-22T06:30:14

 

1 RO channel per session and keep connected

 


 

Telegram link

 

2020-07-22T06:32:55

 

I put in here

 


 

Telegram link

 

2020-07-22T06:48:15

 

looks correct

 


 

Telegram link

 

2020-07-22T06:50:58

 

I would start trying to determine which request is taking more time (or if they are all taking the same time).

 

OnBeforeDispatch event occurs immediately before the request is processed and OnAfterDispatch occurs after

 


 

Telegram link

 

2020-07-22T06:56:49

 

Each request is processed in a thread. So, if you declare a threadvar in your server controller you can easily measure those times:

 

uses

 

System.Diagnostics, Windows;

 

threadvar

 

sw: TStopwatch;

 

procedure TIWServerController.IWServerControllerBaseBeforeDispatch(

 

Request: THttpRequest; aReply: THttpReply);

 

begin

 

sw := TStopwatch.StartNew;

 

end;

 

procedure TIWServerController.IWServerControllerBaseAfterDispatch(

 

Request: THttpRequest; aReply: THttpReply);

 

begin

 

sw.Stop;

 

OutputDebugString(PChar('Ellapsed: ' + IntToStr(sw.ElapsedTicks)));

 

end;

 


 

Telegram link

 

2020-07-22T06:57:49

 

Using DebugView you can use this to easily capture the output in your prod server:

 

type: link https://docs.microsoft.com/en-us/sysinternals/downloads/debugview

 


 

Telegram link

 

2020-07-22T06:58:50

 

of course you can add more info to that output so you can identify which request is which