Well, from this I am certain that we should not change the buffer size
to 1024*1024, rather keep it at 1024.
Please try with stat, using a dynamic buffer size based on the file
size, my gut feel is that it is going to be the best solution.
Thanks,
Samisa...
Kapila Dissanayake wrote:
Hi,
I did some testing agian with to measure the binary file transfer
times. In axis2 c data_handler.c, different buffer sizes (1024 and
1024*1024) were used to read files.
I think using fixed size buffers to read binary files in axis2-C has
been affected in some cases to slow down the transfer.
Thanks
Kapila
Please see the following test results
Environment
----------
Processor - Intel Celeron M 1.40GHz
RAM - 256 MB
OS - Fedora Core 4.
Java Server - axis2 Java
C Server - axis2
mtom C and java test clients were used
Time Taken in milli seconds
File Size (kb) Java Server (ms) Java Server (ms) C
Server (ms) C Server (ms)
Java Client (ms) C Client (ms) C Client (ms) Java
Client (ms)
*Buffer Size* *1024 * *1024 X 1024* * * *1024*
*1024 X 1024 *
----------------- ----------------- -----------------
----------------- ----------------- -----------------
----------------- ----------------- -----------------
----------------- ----------------- -----------------
13.8 147 158 73 1884
188 143
28.2 515 488 78 1912
222 413
37.8 538 694 131 1917
232 474
132 571 807 212 2177
263 420
154 547 672 239 2215
347 389
165 688 683 397 2380
364 400
561 1340 1024 995 2537
637 899
762 1766 1336 1903 2890
1248 1218
1162 3464 1970 4859 3602
1702 1718
1761 4666 3274 10928 8028
2780 3249
2081 6777 2993 15066 11008
3595 3281
4241 23038 Could not transfer (Java client Broken)
52853 33351 16234 115777
On 5/8/06, *Samisa Abeysinghe* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Hmmm, Interesting. There seem to be a problem in C client in case of
large attachments.
This must be due to the fact that we are using a loop to read the
file.
If we stat and read the file at once, there could be an improvement.
Why is it so slow, in C vs C case? (Third column) This is worth
investigating.
Thanks,
Samisa...
Kapila Dissanayake wrote:
> Hi,
>
> I did some testing on binary attachment transfer times, with axis2
> 'java' and 'C' servers with sample mtom clients. It took very high
> transfer times for large size attachments. Some minor modificaions
> were done to the data_handler.c and it was sent to the mailing list.
>
>
> (File Size) vs (Time Taken in milli seconds) to transfer binary
> attachments
>
> Environment
> ----------
> Processor - Intel Celeron M 1.40GHz
> RAM - 256 MB
> OS - Fedora Core 4.
> Java Server - axis2 Java
> C Server - axis2
> mtom C and java test clients were used
> Time Taken in milli seconds
>
> File Size (kb)
>
> Java Server
>
> (ms)
>
> Java Server
>
> (ms)
>
> C Server
>
> (ms)
>
> C Server
>
> (ms)
>
>
>
>
> Java Client
>
> (ms)
>
> C Client
>
> (ms)
>
> C Client
>
> (ms)
>
> Java Client
>
> (ms)
> ---------------
>
> ---------------
>
> ---------------
>
> ---------------
>
> ---------------
>
> ---------------
>
> ---------------
>
> ---------------
>
> ---------------
> 28
>
>
>
> 445
>
>
>
> 274
>
>
>
> 2004
>
>
>
> 1009
>
>
> 38
>
>
>
> 617
>
>
>
> 297
>
>
>
> 1957
>
>
>
> 842
>
>
> 132
>
>
>
> 593
>
>
>
> 527
>
>
>
> 2181
>
>
>
> 726
>
>
> 154
>
>
>
> 551
>
>
>
> 447
>
>
>
> 2081
>
>
>
> 677
>
>
> 165
>
>
>
> 440
>
>
>
> 743
>
>
>
> 2147
>
>
>
> 676
>
>
> 561
>
>
>
> 1029
>
>
>
> 418
>
>
>
> 2581
>
>
>
> 1075
>
>
> 762
>
>
>
> 2137
>
>
>
> 1572
>
>
>
> 3231
>
>
>
> 2356
>
>
> 1162
>
>
>
> 3172
>
>
>
> 2962
>
>
>
> 3981
>
>
>
> 3100
>
>
> 1761
>
>
>
> 7672
>
>
>
> 5494
>
>
>
> 8186
>
>
>
> 3041
>
>
> 2081
>
>
>
> 7768
>
>
>
> 6837
>
>
>
> 11757
>
>
>
> 3499
>
>
> 4241
>
>
>
> 14465
>
>
>
> 24060
>
>
>
> 36168
>
>
>
> Could not transfer (Error Occured in Java client)
>
>
>
>
> Thank You
>
> Kapila