NetTalk Central

Author Topic: Meaning of some perfomance data  (Read 3902 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Meaning of some perfomance data
« on: May 01, 2014, 04:32:41 AM »
Hi, I´m wondring what some perfomance data means.
They are:

Spiders

Sessions
Thread Pool
Connections

I am very confused about Sessions and connectios and so on.
If I just refresh the login page, a Session appears even if I am not logged in.
I logged in and Sessions stay in 1, Sessions data increments.
I logged out and sessions goes to 0 an then goes to one again.
And connections confused me too.
I´ve done a small video with this, see it its more understandable than my words.

http://screencast.com/t/urKrsyJgM5Lu

Thanks

PD: How can I add a List to the perfomance page to see which IPs/user are logged in now?

-----------
Regards
Alberto

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Meaning of some perfomance data
« Reply #1 on: May 05, 2014, 03:15:45 AM »
Spiders

> web robots that visit your site like Google

Sessions
> memory cookie on users browser

Thread Pool
> wip still I think

Connections
> connection between server and browser

I am very confused about Sessions and connectios and so on.
If I just refresh the login page, a Session appears even if I am not logged in.

> you need a session before you login otherwise server side code has no way to store your login and pw to compare with valid choices

I logged in and Sessions stay in 1, Sessions data increments.
> correct

I logged out and sessions goes to 0
> correct as the session can be deleted on a logout

an then goes to one again.
> not sure about that unless you logged out back to your login screen

And connections confused me too.
> the greater number of concurrent connections uses more resources. The connections will be running 1 or more threads. Looking at the number of sessions, connections and Threads will help you assess the potential capacity of your server resources.


I´ve done a small video with this, see it its more understandable than my words.

http://screencast.com/t/urKrsyJgM5Lu

Thanks

PD: How can I add a List to the perfomance page to see which IPs/user are logged in now?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Meaning of some perfomance data
« Reply #2 on: May 05, 2014, 09:47:08 PM »
Sorry, I missed this thread the first time around.

The distinction between Sessions, Logins, and Connections is important.

A session exists when a user accesses the site. It has nothing to do with whether they are logged in or not. If you make a request of the server, then a session is created (or already exists.)

A session can be logged in or logged out. That's a completely separate setting.

A connection exists for a brief instant as the browser sends a request, and receives a reply. It has nothing to do with a session, and has nothing to do with whether the session is logged in or not. Typically the number of connections will more-or-less match the number of threads, but not exactly. Large POST's for example will open the connection well before the thread is created.

Thread Pool is not currently used.

>> How can I add a List to the performance page to see which IPs/user are logged in now?

Add a memory table to your dictionary. Add a browse on this memory table to the Window. Add entries when a user logs in, and remove entries when a user logs out (ie in WebHandler, SetSessionLoggedIn method).
Note that this will have a major (detrimental) effect on browser performance, which is why I haven't done it.

Cheers
Bruce





tglomb

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • AObit Software
    • Email
Re: Meaning of some perfomance data
« Reply #3 on: May 08, 2014, 11:54:59 AM »
Hello Bruce,
"Note that this will have a major (detrimental) effect on browser performance, which is why I haven't done it."
please can you explain a little bit more detailed ?
I'm working on a system which requires at a later stage a nearly complete logging of all user actions, especially logins/logout, which records they access how often and at which time.. a.so.  And all that must be stored permanently for later investigation (so no IMDB).
How to avoid a detrimental effect ?
TIA, Thomas 

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Meaning of some perfomance data
« Reply #4 on: May 08, 2014, 10:20:24 PM »
Hi Thomas,

>> please can you explain a little bit more detailed ?

The original comment had more to do with the actual session queue.

the session queue is data (in this case a queue) shared among all users accessing the system. In order to be thread-safe access to this data must be "synchronized". Meaning that only one use can access it at a time. So, not surprisingly it's ideal to keep unnecessary access to a minimum.

Thus working from the "original" queue would be undesirable. So I tweaked my answer to him (along the way) to create his own Memory table (which is thread safe) and to maintain that table with code, rather than try putting a list control on the "source" queue. The performance impact would still be there, but it won't be as severe. (Performance-wise, it will depend a bit on how often the browse on the server is refreshed.)

>> I'm working on a system which requires at a later stage a nearly complete logging of all user actions, especially logins/logout, which records they access how often and at which time.. a.so.  And all that must be stored permanently for later investigation (so no IMDB).

Obviously in your case all these writes will take some amount of time. Writes are typically the most expensive disk accesses, so if you are creating logs every time someone reads a record, that will necessarily slow things down. If you need to do this I recommend fast hard drives (SSD's) and most certainly do not log on the same disk as the actual data is.

cheers
Bruce



tglomb

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • AObit Software
    • Email
Re: Meaning of some perfomance data
« Reply #5 on: May 09, 2014, 09:50:14 AM »
Thanks for the explanation. It confirms what I thought before.
I think I'll notify() the Log info's to a worker thread or better IPC it to a separate process. And anyway it will run on heavy iron, for sure.
Thanks again Bruce.