Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Aug 2009
    Location
    a
    Posts
    6

    Lightstreamer Performance Issues while fetching data from db

    Hello,

    I'm running LS Moderato on a RedHat Enterprise based server.
    I've built a multithreaded adapter which has two threads:

    1. A thread Contacts a MySQL database using the latest Connector/J Jar every fixed interval , it retreives some data and pushes that data to users if it has been changed.
    (I'm using a ConcurrentHashtable to cache results)
    2. A Thread that pushes the server's time and date every second

    Now, I'm not sure why, and I tried tweaking the code many times and changing the version of the connector /j as well but at certain point
    the java binary rises to 150% cpu usage (multi core environment) , and LS becomes unresponsive, any ideas what may cause that (aside from the adapter code, which works without a hiccup under win2k8 environment)

    Any known problems whilst using mysql w/ LS under linux?

    Thanks beforehand, Max.

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,090
    You can try to identify the linux lightweight processes which consume most CPU (with the -L option on ps),
    then find them on a JVM thread dump taken on Lightstreamer Server and see whether they belong to the kernel or to external code.
    Note that the LWP id is listed as decimal by ps and as hexadecimal by the JVM.

    One known case is when one reuses HashMap object instances supplied to update or smartUpdate (which is not allowed, though).
    We noticed, in some cases, that a HashMap got corrupted and this gave rise to an endless loop when calling a harmless HashMap method.

  3. #3
    Member
    Join Date
    Aug 2009
    Location
    a
    Posts
    6

    HashMap

    So HashMap objects are not allowed to be supplied as the 2nd parameter of smartUpdate() ?

    Since it can recieve a Map descendant object, or am I getting this all wrong?

    Thanks again

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,090
    You can supply HashMap objects as the 2nd parameter of smartUpdate.
    The only restriction is that you have to use a brand new HashMap object instance on each invocation. Put in a more general way, once a HashMap object is supplied to smartUpdate, you can no longer use it.
    Depending on what you get from your feed interface, you may have to perform some copy or clone operation.

    However, Map objects which are not also HashMap objects are not subject to the restriction.
    (I'm not sure if this also answers your second question).

 

 

Similar Threads

  1. Stress Test / Performance
    By rmusco in forum General
    Replies: 5
    Last Post: January 4th, 2013, 01:38 AM
  2. Performance problem
    By achittoda in forum Adapter SDKs
    Replies: 1
    Last Post: December 22nd, 2009, 10:15 AM
  3. Replies: 3
    Last Post: February 12th, 2009, 11:31 AM
  4. Performance test for Lightstreamer
    By quanhm in forum General
    Replies: 1
    Last Post: May 19th, 2008, 10:48 AM
  5. Issues and performance problems in the J2ME library
    By rsouissi in forum Client SDKs
    Replies: 2
    Last Post: December 28th, 2007, 09:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 11:13 PM.