Best buffer size for BufferedInput/Output Streams?

I'm developing a client-server application where one server serves an undetermined number of clients. The server spins off threads to service each client individually. The clients send data (serialized objects) to each other via BufferedInput/OutputStreams wrapped in ObjectInput/OutputStreams. The streams are created like this:
toServer = new ObjectOutputStream(new BufferedOutputStream(theSocket.getOutputStream()));
fromServer = new ObjectInputStream(new BufferedInputStream(theSocket.getInputStream()));I've never had more than a handful (5-6) users on the system at one time, and it works fine. However, I haven't the resources to test the system with a large number of clients, and I'm wondering if the default buffer size is enough to handle a potentially large amount of traffic to a client. Should I increase the buffer size just in case, or should I not worry? Does the buffer size even matter when using an ObjectInput/OutputStream?
I'd appreciate any good advice.

There is an underlying buffer size of 1024 in ObjectIn/OutputStream anyway so the buffer should be at least this large. Generally 4k is adequate unless you are doing very high data volumes in which case 16k, 32k, 63k may help. If you are on Windows you should also up the socket send/receive buffers which by default are 8k: change this to at least 28k. The precise value depends on the network link & in theory should be >= the bandwidth-delay product.

Similar Messages

  • What is the best font size for text when making a book in iBooks Author? My present font is Baskerville at 20 pt.

    What is the best font size for text when making a book in iBooks Author? My present font is Baskerville at 20 pt.

    For what audience? What reading level? Which Flesch-Kincaid index? What type of content? How much white space? What language(s)?

  • Buffer size for SQL statement using JDBC calls

    I need to find out the buffer size for SQL statements in jave/JDBC because I need to insert or update a field that could be up to 4KB in size.

    I'm not sure that I follow the question; I'm not sure which buffer size you're referring to.
    If you have a field that can store up to 4k worth of data, you would create a VARCHAR2(4000) column in the Oracle database (assuming it is character data) or a BLOB column (if the data is binary). Either of those two fields can be populated from JDBC.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to caluculate buffer size for import/exports in oracle

    Hi DBAS,
    how to caluculate buffer size for import exports,here is the formula but how can we use if there is a 100 of tables and datatypes,is the any query to find out rows_in_array ,maximum_row_size total schema and datbase
    buffer_size = rows_in_array maximum_row_size*
    Thanks,
    tmadugula

    http://download.oracle.com/docs/cd/B10501_01/server.920/a96652/ch01.htm
    Search "buffer"

  • I need to increase my FMS buffer size for display video smoothly

    I need to increase my buffer size in FMS.
    Please let me know form where i would be increase my FMS buffer size.
    My video is running from RTMP and i faces the problem to load. video stalled between the running. so i need to increase buffer size for running video smoothly.
    Please reply me as soon as possible so i can resoled my problem.
    Thanks in advance.....

    Hi,
    You can increase the buffer size by using the property bufferTime of NetStream Object you are using. For eg: if ns is your NetStream Object then it can be done by ns.bufferTime=<desired value>.
    Also you can go through this
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/NetStream.html#bufferT ime.

  • HT4818 What is the best Partition size for a windows 7 Home Premium. I'm trying to install Windows using Boot camp

    What is the best Partition size for a windows 7 Home Premium. I'm trying to install Windows using Boot camp

    Go into your system preferences and click the startup disk icon then select your Mac HD. 

  • Max buffer size for HDS streams

    How does OSMF (v2.0) compute the max buffer length for HDS streams (pre-recorded)?
    I have  mediaPlayer.bufferTime = 5 seconds, but I see that even on very good b/w connections, the buffer length does not exceed 7.5 secs. Is there a way to increase the maximum buffer length value, so that clients on higher b/w can accumulate a larger buffer?
    By comparison, for RTMP, the buffer length seems to go up to 60sec which is consistent with what the docs say here:
    http://livedocs.adobe.com/flashmediaserver/3.0/hpdocs/help.html?content=00000175.html
    Thx,
    - abey

    No. Did not find a way to set the maxBuffer value, but I was able to workaround the problem by setting the mediaPlayer.bufferTime dynamically (i.e different values for various stages of playback, like loading, seeking, buffering, normal playback etc.)..So setting bufferTime to 60 secs during normal playback allows the buffer to grow to a decent size.
    - Abey

  • How to reset buffer pointer for analog output generation?

    I am doing a finite analog output generation on a USB-6216
    Sequence of events:
    DAQmx Create Task
    DAQmx Timing (finite samples, 1000Hz)
    Use DAQmx timing property SampQuantamples per channel to set buffer size
    Write buffer with DAQmx Write
    Repeat
      DAQmx Start Task
      DAQmx Wait until done
      DAQmx Stop Task
    Until finished
    DAQmx Clear Task
    I get a full waveform output on the first iteration of the loop. On subsequent iterations I get only a small section of the waveform, but no error. It seems that it is regenerating the waveform, because when I switch off regeneration I get an error at Start Task, but before it can regenerate all the data Wait Until Done.vi decides that the generation is done and exits, stopping the generation.
    I have done this with a PCI device and it works fine; every call to Start Task generates the whole waveform again.
    OK, so it looks like after every waveform generation completes I need to reset the pointer to the start of the buffer, so that the Wait Until Done vi does not think the generation is done. Or - maybe there is a way to reset the "Generation Done" state?
    I'm sure there's an easy way to do this....?

    Hi CDancer,
    Many thanks for contacting National Instruments. If I can start by giving some general advice, it would be well worth posting your actual VI. This helps others on this forum in helping you with your application. 
    From the sounds of things, you want to do continuous analog output generation. I have had a look at the examples that come with LabVIEW and I think you should look at the one below.
    I would have a look at some of the DAQmx examples that come installed with LabVIEW. The following example would be particularly relevant I feel
    Cont  Gen Voltage Wfm-Int Clk-non Regeneration.vi 
    Please let me know how you get on.
    Many thanks,
    Andrew McLennan
    Applications Engineer
    National Instruments

  • Where can I change the buffer size for LKM File to Oracle (EXTRENAL TABLE)?

    Hi all,
    I'd a problem on the buffer size the "LKM File to Oracle (EXTRENAL TABLE)" as follow:
    2801 : 72000 : java.sql.SQLException: ORA-12801: error signaled in parallel query server P000
    ORA-29913: error in executing ODCIEXTTABLEFETCH callout
    ORA-29400: data cartridge error
    KUP-04020: found record longer than buffer size supported, 524288, in D:\OraHome_1\oracledi\demo\file\PARTIAL_SHPT_FIXED_NHF.dat
    Do you know where can I change the buffer size?
    Remarks: The size of the file is ~2Mb.
    Tao

    Hi,
    The behavior is explained in Bug 4304609 .
    You will encounter ORA-29400 & KUP-04020 errors if the RECORDSIZE clause in the access parameters for the ORACLE_LOADER access driver is larger than 10MB and you are loading records larger than 10MB. Which means their is a another limitation on read size of a record which is termed as granule size. If the default granule size is less then RECORDSIZE it limits the size of the read buffer to granule size.
    Use the pxxtgranule_size parameter to change the size of the granule to a number larger than the size specified for the read buffer.You can use below query to determine the current size of the granule.
    SELECT KSPFTCTXPN PARAMETER_NUMBER,
    KSPPINM PARAMETER_NAME,
    KSPPITY PARAMETER_TYPE,
    KSPFTCTXVL PARAMETER_VALUE,
    KSPFTCTXDF IS_DEFAULT,
    KSPPIFLG MODIFICATION_FLAG,
    KSPFTCTXVF VALUE_FLAG
    FROM X$KSPPI X, X$KSPPCV2 Y
    WHERE (X.INDX+1) = KSPFTCTXPN AND
    KSPPINM LIKE '%_px_xtgranule_size%';
    There is no 'ideal' or recommended value for pxxtgranule_size parameter, it is safe to increase it to work around this particular problem. You can set this parameter using ALTER SESSION/SYSTEM command.
    SQL> alter system set "_px_xtgranule_size"=10000;
    Thanks,
    Sutirtha

  • Best Slide Size for SlideShow

    I am preparing a slide show to be presented on a large screen television set. A 50 incher.
    What would be the ideal size for my slides to be sized before I add them to the iDVD slide show board? Better to save them as pdf files or simple jpeg images?
    I tried to look this information up on the iDVD help menu on my computer but the help function does not work. Thanks.

    Here are some links to info that may help you:
    http://discussions.apple.com/thread.jspa?messageID=10244832&#10244832
    http://discussions.apple.com/thread.jspa?messageID=10504572&#10504572
    http://discussions.apple.com/thread.jspa?messageID=9349886&#9349886
    http://discussions.apple.com/thread.jspa?messageID=9950128&#9950128
    http://discussions.apple.com/thread.jspa?messageID=9215729&#9215729
    You will probably have to do some experimenting to see what works best for you.

  • I/O Buffer Size for files transfers

    Hello,
    Do you know how to change I/O Buffer size ?
    I use large data transfers from my macbook to volumes of an afp OS X 10.5.8 Leopard.
    Since 10.6.4 upgrade, my files transfers on the internal network slows down. Around 2Mo/s. It was best before.
    I suppose that size of the packets of datas has ben reduced, and I would like to run comparative tests with various values.

    At first, first advantage is that the software document how is implemented standard OS set-up :
    - The system parameters are sysctl variables that are set as follows:
    net.inet.tcp.sendspace: 131072
    net.inet.tcp.recvspace: 358400
    kern.ipc.maxsockbuf: 512000
    so : Packets of files copied on the finder are by default : 512k large. This is also visible during copies.
    With the new set-up, this size is increased to 1024k. I've not found exactly in wich file are saved these system parameters.
    After the buffer size change, the file copy speed is not enough improved : finally, interest of the change is not very high.

  • How to decide buffer sizes for specific size of RAM

    Hi sdners.
    Generally, how can we decide the buffer sizes which are shown in the ST02 screen. suppose we have 100GB ram /5GB ram,  then how can we decide the related buffer sizes...and generally which buffer takes more place in the RAM
    Thanks in advance.

    Hi balaji
    You can tune your SAP buffer by the statistics of Hit Ratio and swap occuring.  There should not be no swap on your system. you can adjust your buffer value by the optimizing the both value.
    Regards
    Anwer Waseem
    SAP BASIS

  • Best Video Size for YouTube

    I know YouTube says to post videos at 320x240 but they upscale the image so the videos do not play at 320x240. I have a question into YouTube but they may take days to respond. I've searched through many YouTube questions here and found different information.
    My question is what is the playback size for the videos on YouTube? I want to make my videos the same size so they won't be upscaled, thus quality lost.
    I've read here that YouTube plays back at 425x350 while another says 450x357. Anyone know?
    G5   Mac OS X (10.3.9)  

    Wow, thanks for that in-depth reading!
    Two things: first, I am going to post the direct link to your download here:
    http://www.kenstone3.net/fcphomepage/images_youtube_compressor_gary/Youtube_comppresets.zip
    (it is kind of hidden in the middle of the text)
    Secondly, in playing with these presets, I disagree about the de-interlacing not taking any extra time. In my tests, your SD preset said it was going to take four hours to finish a five minute clip of mine.... disabling the de-interlacing, it jumps to four minutes to complete. I will do both and see how much visual difference there is, but that is substantial for me! (sixty times as long)
    Any who, I am running some different tests... will let you know once I have some results of my own.
    Matthew

  • How to increase the buffer size for Oracle?

    After I installed the patch 9.2.0.4, I kept getting 'ORA-03113: end-of-file on communication channel' error. According to the metalink, increasing the buffer size may solve this problem. I found when I set the trace on, this problem was gone, and after I set the trace off, it came back again. I am not sure if setting the trace on increases buffer size automatically or not, but I want to start from here.
    No matter how easy it is, I really didn't change buffer size before, can anyone show me how to do that?
    Thanks a lot.

    Hi,
    I think they asked to increase the db buffer cache size. You may try this
    alter system set db_cache_size=<new size in bytes> scope=both;
    Cheers
    Muneer

  • Best Picture Sizes For 8.5 by 11 Book

    i need to resize all my photos from around 1500 x 1500 px to ????? on another computer that has photoshop on it (i cant belive iPhoto wont let you resize a jpeg). All the pictures are to large for the book i am making
    whats a good size for the jpeg's to be for a 8.5 x 11 book???
    thanks
    brad
    ps is there any basic free photo editing software out there that will let me just resize a jpeg?

    Brad:
    For a book use the largest pixel dimensions available. Do not resize down. If you need to downsize a photo for use outside of iPhoto use the File->Export->File Export menu option and you'll be able to set the pixel dimension and the amount of jpg compression (quality) for the exported file.
    For batch resizing outside of iPhoto Resize! is a very good app and it's free.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

Maybe you are looking for

  • Can't boot from hard disk or from windows 7 recovery dvd

    I have a 970A-G46 motherboard. I can't boot from hard disk or from a windows 7 recovery dvd. If I move the hard drive to another PC, it boots fine. If I put the DVD in another PC's dvd drive, it can be accessed. This machine will boot from an Ubuntu

  • Please check the entries, no work list selected

    Hi Experts, We have created one custom transaction to run RV50SBT1 to create deliveries from open purchase orders. When we are doing a call transaction to the custom transaction in a report, this does not work and does not select open POs for process

  • Incompletion Check in Customs Declaration

    We are upgrading our GTS system from 7.0 to 8.0. When we process outputs in communications tab, we are getting and error as "Executor/Sender not maintained for CD#xxxxxxxxxxx". We Debuged and found that the system is looking for partner function CUSV

  • HT202213 the "show" menu is not visible. How do I find it?

    I am trying to import music from a shared computer. I can see all of the music, but I cannot see the "show" menu to choose "items not on this computer". What am I doing wrong?

  • Where can I find old version for ipad

    cuz my ipad is not update, i want to use old version. where can i find it?