*
The moose likes Linux / UNIX and the fly likes Setting Heap size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Setting Heap size" Watch "Setting Heap size" New topic
Author

Setting Heap size

Prashanth Chandra
Ranch Hand

Joined: Dec 07, 2005
Posts: 79
Hi
I am using VC++ client to get the data from servlet. When i am trying to get the data from VC++ client its showing like you have received 8KB only where as i am trying to get 20KB.
I think if I set the Heap size of the server appropriately then this problem would be solved. Just need to know how to set the Heap size of the server.

regards
Prashanth
Thanks in advance
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18507
    
  40

What does the heap size of the web server have anything to so with the amount of data that a servlet (running in the server) sends? Is the web server running out of memory, and exiting before the servlet can send the full 20k?

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Prashanth Chandra
Ranch Hand

Joined: Dec 07, 2005
Posts: 79
Hi


Actually the problem is I am getting 20kb of data as whole.But I am getting it in the 8KB slots. I want it to be happen in a 20kb slot.

regards
Prashanth
Thanks in advance
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

I don't think you can control the amount of data you receive from a socket. What you get is a cumulation of the various network layers.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Prashanth Chandra
Ranch Hand

Joined: Dec 07, 2005
Posts: 79
Hi
Generally the TCP/IP packet size is 8 KB, is there any possibilyt that we can change the TCP/IP packet size to somewhere around 20KB, If this is possible where do i need to configure this on the server or in the program.

regards
Prashanth
Thanks in advance
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

Originally posted by Prashanth Chandra:
Hi
Generally the TCP/IP packet size is 8 KB


It is substantially less than that:
a TCP/IP node can send small amounts of data (typically less than 1500 bytes) with no difficulty, but transmission attempts with larger amounts of data hang, then time out.

Adjusting IP MTU - Cisco.com
There is no way to change packet size programmatically. Even if there were, other network layers can chop up the packet they are handling as needed.
Why is this a problem?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting Heap size
 
Similar Threads
SSL Communication between Java and VC++
heap size in apache tomcat 5.x
server stops when trying to download blob data from db2(size 600 mb)
Java Heap size
Problem with setBufferSize()