How to calculate network latency ?

Hello fellow programmers,
I need to calculate the latency between a client and a server using both TCP and UDP. I have built a TCP client and a server which accepts and sends a String using the writeBytes(String) and readLine() function.
The problem am facing is to send specific number of bytes like 500, 1000, 2000 to calculate latency since the client and server accept Strings.
Any suggestions ?

I just realized what you are really asking. You are asking how you can create a String that will write out to 500 bytes right? I think as long as you are using ascii encoding the nubmer of byte and number of characters in the String should be the same. It's easy to check. Use the getBytes method to see what the length the default encoding produces given a String 500 chars long.

Similar Messages

  • How to calculate network bandwidth for dataguard 11.2

    Hi all,
    have a customer who needs to setup a new data guard environment in release 11.2.0.2. Primary site will be in Italy, standby site will be in New York.
    He would like to know the network bandwidth between primary and standby site needed to obtain the maximum performance in redo transport with or without compression option.
    I found a lot of threads and docs indicating some formulas but none of them explained how to:
    - calculate network bandwidth on a rac system (having a single instance standby database)
    - calculate network bandwidth in case of use redo transport compression
    - calculate cpu consumption if using redo transport compression
    Could you please give any advice?
    A.M.

    Hi,
    customer made ma a lot of technical question just like the following:
    - which are the main factors determining the 30% overhead indicated in the network bandwidth calculation
    Required bandwidth = ((Redo rate bytes per sec. / 0.7) * 8) / 1,000,000 = bandwidth in Mbps
    - how much bandwidth will I gain if I apply redo transport compression and why redo transport compression and why usually the gzip utility gives me 5X less and oracle compression gives me a maximum of 50-60% of compression even if it uses the same engine of zlib compression as indicated below?
    Data Guard redo transport compression uses the same zlib compression engine at level 1 as gzip -1. To estimate the compression ratio you can achieve using Data Guard redo transport compression, first compress an archived redo log file with gzip:
    $ gzip -1 <archive redo logfile>.arc
    Then use the gzip --list option to explicitly display the compression ratio:
    $ gzip --list <archive redo logfile.arc>.gz
    Note: Use gzip version 1.3.3 or later. Refer to www.gzip.org for the latest information on gzip.
    Could anyone give me any direction?
    Thank you
    AM

  • How to determine network bandwidth for EP 6.0 implementation

    Hi
         can you please guide me how to determine the network bandwith requirment for SAP EP6.0 implementation for smoother operation
    Thanks & Regards
    Ashutosh

    Hi Ashutosh,
    luckily network bandwidth is mostly not a problem as long as it is not very small, e.g. a modem dial-up 56kbps connection on client side. To make sure that the server side outgoing line is strong enough, you'd need to do some math and calculate from the expected request volume how much bandwidth you'd need. Some guidance might be taken out of the how to paper under this link:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how to perform sap enterprise portal load testing.zip.
    Check chapter 2.4 in the pdf file.
    For "smooth operation" you'd need network wise not only worry about bandwidth but also about network latency times and sometimes network quality in regard to % package losses or similar. If your end users are more then 1000 miles away you usualy start seeing response time increases from latency times...
    The impacts of networking on performance are many, but so are the tuning possibilities. If you have a lot of end-users accessing EP over a WAN, perhaps even over the Internet, and if they do so over long distance you might want to make EP landscape WAN tuning a dedicated task in your project.
    In addition the network requirements of Portal are discussed in this paper : http://service.sap.com/~form/sapnet?_SHORTKEY=01100035870000757275&_SCENARIO=01100035870000000112&_OBJECT=011000358700003943521999E , chapter  3.5.2 Enterprise Portal.
    Best Regards, Joerg

  • Need to know how to calculate and allocate the server side bandwidth between two exchange sites for DAG replication

    Hi All,
    Please have a look in to the below mentioned environment.
    primary site :SITE 1
    server 1 
    server 2 
    secondary site :SITE 2
    server 3
    Note : All the above three servers are in single DAG .All the database are mounted on the server (server 1) which is located in the primary site (I.E SITE 1).
    On that 5 databases we are having 3500 users .Based on the user designation we have allocated the mailbox size.
    Query : Each and every day we are having the large no copy queue length for all the five databases to the server located in SITE 2.
    Please help me out on this and also tell me is there any tool available to exactly get the required bandwidth for the exchange servers located between the active directory sites.
    Thanks & Regards S.Nithyanandham

    I don't know of any tool that can calculate things for you but latency is the biggest thing you have to worry about. The other issues is looking at the network gear between the 2 sites. I have seen many times were switches get maxed out if they are set to
    1 GB or even ports getting maxed out and need to bonded for more throughput. Test your latency from the edge of each site then test it within to see if there is a difference. 
    Regardless of their geographic location relative to other DAG members, each member of the DAG must have round trip network latency no greater than 500 milliseconds between each other member.
    As the round trip latency between two Mailbox servers hosting copies of a database increases, the potential for replication not being up to date also increases. Regardless of the latency of the solution, customers should validate that the networks between
    all DAG members is capable of satisfying the data protection and availability goals of the deployment. Configurations with higher latency values may require special tuning of DAG, replication, and network parameters, such as increasing the number of databases
    or decreasing the number of mailboxes per database, to achieve the desired goals.
    Round trip latency requirements may not be the most stringent network bandwidth and latency requirement for a multi-datacenter configuration. You must evaluate the total network load, which
    includes client access, Active Directory, transport, continuous replication, and other application traffic, to determine the necessary network requirements for your environment.
    http://technet.microsoft.com/en-us/library/dd638104(v=exchg.150).aspx
    DJ Grijalva | MCITP: EMA 2007/2010 SPA 2010 | www.persistentcerebro.com

  • How to calculate optimized number of members of WLS cluster

    Hi everyone.
    I have a Oracle AS Portal 11g that run on a cluster with 2 managed servers. Each of managed server run with 8Gb heap (it is too much, I think so).
    My system has two node with 32G RAM each one (that run RHEL 4.x). While monitoring, I see that my server use a little amount of CPU. So, I want to increase the number members of cluster. I read the sizing guide for WebLogic Portal but it was not show any guide to determine how to calculate the optimized number of members of cluster.
    I'm stuck in this situation for a week. Because my cluster will became "Warning" state after several days caused by Stuck thread. I want to increase size of cluster to improve HA (I'm trying tuning other factor such as network, DB, I/O, ... )
    Please tell me your idea to calculate and design the size of cluster with desired resource (eg: 32Gb RAM total, and 6G heap size for each of WLS instance).
    Every reply is appreciated
    Regards
    Cuong Pham

    Looking at your struck thread behaviour of application, even increasing the Managed Server will not help.
    Yes of course it may provide few more days of application available than the current condition but on long run definitely you will face the same issue again.
    Better understand the reason for threads getting struck with the help of thread dump, stack and troubleshoot the actual issue.
    Below link will guide you in over coming this issue if there are no leaks in application and if your application actually requires time to process requests
    http://docs.oracle.com/cd/E13222_01/wls/docs92/ConsoleHelp/taskhelp/tuning/TuningExecuteThreads.html
    Other Stuck Thread Handling procedures which weblogic provides are given below
    WebLogic Server checks for stuck threads periodically. If all application threads are stuck, a server instance marks itself failed, if configured to do so, exits. You can configure Node Manager or a third-part high-availability solution to restart the server instance for automatic failure recovery.
    You can configure these actions to occur when not all threads are stuck, but the number of stuck threads have exceeded a configured threshold,
    ■Shut down the Work Manager if it has stuck threads. A Work Manager that is shut down will refuse new work and reject existing work in the queue by sending a rejection message. In a cluster, clustered clients will fail over to another cluster member.
    ■Shut down the application if there are stuck threads in the application. The application is shutdown by bringing it into admin mode. All Work Managers belonging to the application are shut down, and behave as described above.
    ■Mark the server instance as failed and shut it down it down if there are stuck threads in the server. In a cluster, clustered clients that are connected or attempting to connect will fail over to another cluster member.

  • [svn:fx-trunk] 10545: Make DataGrid smarter about when and how to calculate the modulefactory for its renderers when using embedded fonts

    Revision: 10545
    Author:   [email protected]
    Date:     2009-09-23 13:33:21 -0700 (Wed, 23 Sep 2009)
    Log Message:
    Make DataGrid smarter about when and how to calculate the modulefactory for its renderers when using embedded fonts
    QE Notes: 2 Mustella tests fail:
    components/DataGrid/DataGrid_HaloSkin/Properties/datagrid_properties_columns_halo datagrid_properties_columns_increase0to1_halo
    components/DataGrid/DataGrid_SparkSkin/Properties/datagrid_properties_columns datagrid_properties_columns_increase0to1
    These fixes get us to measure the embedded fonts correctly when going from 0 columns to a set of columns so rowHeight will be different (and better) in those scenarios
    Doc Notes: None
    Bugs: SDK-15241
    Reviewer: Darrell
    API Change: No
    Is noteworthy for integration: No
    tests: checkintests mustella/browser/DataGrid
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-15241
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridBase .as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColu mn.as

    Hi Matthias,
    Sorry, if this reply seems like a products plug (which it is), but this is really how we solve this software engineering challenge at JKI...
    At JKI, we create VI Packages (which are basically installers for LabVIEW instrument drivers and toolkits) of our reusable code (using the package building capabilities of VIPM Professional).  We keep a VI Package Configuration file (that includes a copy of the actual packages) in each of our project folders (and check it into source code control just as we do for all our project files).  We also use VIPM Enterprise to distribute new VI Packages over the network.
    Also, as others have mentioned, we use the JKI TortoiseSVN Tool to make it easy to use TortoiseSVN directly from LabVIEW.
    Please feel free to contact JKI if you have any specific questions about these products.
    Thanks,
    -Jim 

  • HOW TO CALCULATE NET SALES AND CONTRACT PRICE?

    Dear experts,
    I have the requirement of sales price report
    the report layout should be
    Prod descr    material Number   Contract type  contrcat name     rebate  net sales  contract price  units
    we have the master data information is reside already in multiprovider and transaction information how to calculate in frond end ?
    for sales  pricing report how to manipulate teh net sales and contract  price
    value?
    any standard formulaes is there?
    plz suggest  me
    regards

    Hi,
    For quick and best response unless someone answer's in this forum, post your question in SAP Community Network Forums » SAP Solutions » ERP - Sales and Distribution (SD) General   or something related to your question.
    Check this link if it helps -
    http://help.sap.com/saphelp_46c/helpdata/en/93/74353e546011d1a7020000e829fd11/frameset.htm
    Thanks,
    Shambhu.

  • How to reverse network cost

    Hi All,
    Can someone tell me how to how to reverse network cost
    done thru cj9k
    to bring back the project to its originall status
    Thanks,
    Regards,
    Mercy

    Hi Mercy,
    The CJ9K do the plan costs calculation,  the FI posting and purchase cause the actual costs and commitment. They have nothing to do with each othter.
    To reserve the plan costs is somehow strange requirement. To remove the costing reporting information, the CJEN (with delete flag set) may the right one.  But there is no transaction to reserve the plan costs.  You can initialize the costs relevant information, e.g. planned work = 0, then re-calculate the network.
    Kind regards,
    Zhenbo

  • How do I network my desktop printer with my other MAC laptops? I forgot how to do it in the settings

    How do I network my laptops to my printer? I forget what steps to use in Settings.

    You posted in the iMac (PPC) community.
    You would do better by posting in the "laptop" forum of the model "laptop" that you have.   Your questions has nothing to do w/iMacs (PPC).

  • How to calculate totals in Blocked ALV Report

    Hi All,
    Can any body tell how to calculate totals & sub totals in
    Blocked ALV Report[Blocked List].
    Thanks in advance
    Thanks & Regards,
    Rayeezuddin.

    read this it might help
    Sums                                                       
    15. No_sumchoice(1) TYPE c : This parameter allows the choice for summing up
    Only by fieldcatalog.
    Value set: SPACE, 'X'
    'X' = fields which are to be summed, passed by the calling program (FIELDCAT-DO_SUM = 'X'). The user should not be able to change this value interactively.
    16. No_totalline(1) TYPE c : Removes the option of having totals after sub-totals.
    Value set: SPACE, 'X'
    'X' = no total record is to be output. Subtotals can still be calculated and output. The fields in the subtotals are flagged DO_SUM = 'X' in the field list.
    17. No_subchoice(1) TYPE c : Does not allow the user to interactively change the field chosen for subtotals.
    Value set: SPACE, 'X'
    'X' = value whose change triggers subtotals, provided by the calling program. The user should not be able to change this value interactively.
    18. No_subtotals(1) TYPE c : No subtotals possible          
    Value set: SPACE, 'X'
    'X' = no subtotals.
    19. Numc_sum(1)  TYPE c : Totals only possible for NUMC-Fields.
    20. No_unit_splitting TYPE c: No separate total lines by inh.units   
    21.totals_before_items TYPE c: Display totals before the items   
    22. Totals_only(1) TYPE c :  Show only totals      
    Value set: SPACE, 'X'
    'X' = only total records are output.
    23. Totals_text(60) TYPE c : Text for 1st col. in totals   
    Value set: SPACE, string (max.60)
    ' ' = The first column in the total record contains an appropriate number of '*'s to indicate the total by default. If the first column is wide enough, the string 'Total' is output after the asterisks.
    'String’ = The string passed is output after the total indicated by '*', if the column is wide enough.
    24. Subtotals_text(60) TYPE c : Texts for subtotals
    Value set: SPACE, string (max.60)
    ' ' = In the first column of subtotal records, the subtotal is indicated by an appropriate number of '*' by default. If the first column is not a subtotal criterion, the string 'Total' is output after the asterisks, if the column is wide enough.
    'String’ = the string passed is output after the subtotal indicated by '*', if the column is wide enough and the first column is not a subtotal criterion. If it is a subtotal criterion, its value is repeated after the total, if the column is wide enough.
    ELSE TELL ME I WILL PASTE COMPLETE HELP
    regards

  • How to Calculate Opening balance

    Hi BW Gurus,
    How to calculate Opening balance for previous period using variables in Reports using debit and credit.
    Example:
    Opening balance is the balance for an account for the previous period. In other words, if the user is running a report for Period 1, 2006, the opening balance is actually the ending balance from Period 12, 2005 (December 31st, 2005).
    Thanks in advance
    DJ

    Hi Friend,
    If Your Prob is solve then tell me how to find perticular month balance amount.
    i m create cash book report for perticuler GL Account , i use BKPF + BSEG for this
    i found all entries,
    But at last i want to Opening Balance for perticuler date.
    like     01/05/2007 opening balance = 10000 as per tcode FS10N
    and in 26/05/2007 ??????
    how to find exact date opening balance is there any function for same
    or any procedure..
    Thanks
    From
    Gaurav

  • HOW TO CALCULATE OPENNING BALANCE

    HI Experts..
    How to calculate Opening balance for previous period using variables in Reports using debit and credit.
    Example:
    Opening balance is the balance for an account for the previous period. In other words, if the user is running a report for Period 1, 2006, the opening balance is actually the ending balance from Period 12, 2005 (December 31st, 2005).
    I am Using 0FIAR_O03 ODS ..
    Very Urgent Issue..
    If Possible Stp by Step..
    Cheers
    Purushottam
    09891683828
    [email protected]

    Hi Saloni,
    to get the debit and credit you would be using a variable 0I_FPER(Fiscal year / period), which is a user entry interval variable.
    now to get the opening balance you will have to create a customer exit valiable and the low value of 0I_FPER will have to popuplated by writied the code for the customer exit valiable. you will have to restrict the key figure DEB_CRE_LC for this customer exit variable with the operand as less than(< Fiscal Year /Period from 0I_FPER)).
    If the above was useful please assign reward points.
    Regards
    Venkata Devaraj

  • How to calculate Opening balance for a customer?

    Hi Experts,
    How to calculate Opening balance for a customer? I am trying to develop a report where in i have to get opening AR balance,current sales,adjustments etc of a customer. Please let me know how can i do this. I have some tables with me KNC1, BSAD, BSID.
    Thanks in Advance.
    Sharat Chandra.

    Say for example ..
    Get the opening bal for Customer 'K' in CCode 'C1' in 2008 ..
    First get all items from BSEG ..
    Select * from BSEG where KUNNR eq 'K'
                                     and BUKRS eq 'C1'
                                     and GJAHR eq '2008' .
    Sum all the DMBTR values (This is the total value).
    Second get the cleared items form BSAD for the above entries;
    Select * from BSAD for all entries in BSEG where KUNNR and BUKRS and XBLNR eq BSEG-XBLNR.
    Sum all DMBTR values ( this is cleared value).
    Third substract the cleared value from total to get Open value.
    This is a overview .. you should go to the tables and look for fields and etc.. and then define the logic meeeting your requirements .... this is a genric undersatnding ....
    Thanks,
    Aditya. V

  • How to calculate Average balance for an account

    Hi,
    How to calculate average balance for an account for a particular period say for JAN-12 period and after the end of that period for another two days 01-feb-12 and 01-feb-12 ?
    I'm using the following query :
    SELECT cc.segment1||'-'||cc.segment2||'-'||cc.segment3||'-'||cc.segment4||'-'||cc.segment5||'-'||cc.segment6 "Account_XX",
    nvl(sum(l.accounted_dr - l.accounted_cr),0) "Balance"
    FROM gl_code_combinations cc,
    gl_je_lines l
    WHERE cc.code_combination_id = l.code_combination_id
    AND l.set_of_books_id ='XX'
    and code_combination_id = replace it with code combination_id for account_xx
    AND l.effective_date <= '31-Jan-12' (january period end ??)
    GROUP BY cc.segment1||'-'||cc.segment2||'-'||cc.segment3||'-'||cc.segment4||'-'||cc.segment5||'-'||cc.segment6
    There are some discrepancies in "average balance" after end of month (Jan-12)?
    How to calculate average balances for a particular account (Account_XX above)from end of month of Jan to first two days of february?
    Thanks,
    Kiran

    Kiran,
    Please let me know first, is Average Balancing feature enabled in your GL Ledger?
    Regards
    Muhammad Ayaz

  • How to calculate the total running time for process from sysssislog entries

    Hi All,
    I have the below query which gets me the log entries form the logs table when the process started/completed.
    Select row_number() over (order by starttime) row_num,Substring( Substring(message, CharIndex('''',message) +1 ,Len(message)) ,0, CharIndex('''',Substring(message, CharIndex('''',message) +1 ,Len(message)))) as Description,
    starttime,endtime,message
    from dbo.sysssislog
    where (message like 'start%' or message like 'finish%' ) and
    LEFT(Substring( Substring(message, CharIndex('''',message) +1 ,Len(message)) ,0, CharIndex('''',Substring(message, CharIndex('''',message) +1 ,Len(message)))),1) between 'A' and 'Z'
    order by starttime
    However,I have to build a report on the top of it showing how much time that attribute/dimension/heirarchy took to execute(Ex-How much time did YearlyReview dimension take to complete).I dont have much knowledge of T-SQL and unable to figure out how to calculate
    that on SQL or report level.
    Could someone please assist me in getting the exact query for that?
    Thanks a lot.

    I get the below output(sample 20 rows) on executing this query.Also,a start process does not necessarily follow up a finished message for the same dimension as it may have been stopped or it failed.So we need to leave it as NA in case it started but dint
    finish
    Row_Num Description starttime endtime Message
    1 PAC SC Super Type 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC SC Super Type' dimension.
    2 PAC SC Super Type 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC SC Super Type' dimension.
    3 Team Member Indicator 12/13/12 16:38 12/13/12 16:38 Started processing the 'Team Member Indicator' dimension.
    4 Team Member Indicator 12/13/12 16:38 12/13/12 16:38 Started processing the 'Team Member Indicator' dimension.
    5 PAC SC Super Type 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'PAC SC Super Type' attribute.
    6 PAC SC Super Type 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'PAC SC Super Type' attribute.
    7 Specialist Merger Indicator 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'Specialist Merger Indicator' attribute.
    8 Specialist Merger Indicator 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'Specialist Merger Indicator' attribute.
    9 YearlyReview 12/13/12 16:38 12/13/12 16:38 Started processing the 'YearlyReview' dimension.
    10 YearlyReview 12/13/12 16:38 12/13/12 16:38 Started processing the 'YearlyReview' dimension.
    11 PAC SC Repeat Caller 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC SC Repeat Caller' dimension.
    12 PAC SC Repeat Caller 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC SC Repeat Caller' dimension.
    13 Year 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'Year' attribute.
    14 Year 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'Year' attribute.
    15 Staffing Function 12/13/12 16:38 12/13/12 16:38 Started processing the 'Staffing Function' dimension.
    16 Staffing Function 12/13/12 16:38 12/13/12 16:38 Started processing the 'Staffing Function' dimension.
    17 PAC SC Repeat Caller 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'PAC SC Repeat Caller' attribute.
    18 PAC SC Repeat Caller 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'PAC SC Repeat Caller' attribute.
    19 PAC HV Cust 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC HV Cust' dimension.
    20 PAC HV Cust 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC HV Cust' dimension.

Maybe you are looking for

  • Help displaying an image using the canvas!!!!!!!!

    Hey guys I don't know whether I am not grasping some concepts well.I have been going mad trying to get the code working Here is the code import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import java.io.*; * @author Administrator

  • Issues in displaying the details in the transaction CS03

    Hi Group, I am facing an issue in the Transaction CS03 while displaying the EXTRAS->MORE->Parameter Eff Value Assignment as under: we have created a set of BOM items on the previous data(21.11.2011) with a different Changed documents for the two BOM

  • Which axis version i'm using?

    in my axis list the verion.wsdl displayed like this. WSDL created by Apache Axis version: 1.2.1 Built on Jun 14, 2005 (09:15:57 EDT) but i have seen on the internet there are two main versions in axis - axis and axis 2. which version does my axis bel

  • Unterminated String Constant error generated by JSF

    I'm getting the error in javascript and not being able to figure it out. It is caused by <h:outputLink> tag trying to load HTML page in IE6 browser. I'm attaching this page and hopefully someone would come up with a solution. Thanks a lot in advance.

  • IPC special scenario

    Hi Gurus, I have a scenario I need to design so please help me with. During in-process inspection I need to perform the following: I have a master recipe with 2 phases of quality inspections. At the 1st phase I'll have 3 samples with certain MICs, le