Forum Stats

  • 3,854,249 Users
  • 2,264,344 Discussions


Performance issue with jcifs client code to transfer from samba server

mvittal Member Posts: 4
edited Nov 18, 2015 10:15PM in Networking

Hi All

Trying to trouble shoot performance issue, same code(using JAVA API with SAMBA protocol jcifs-1.3.17.jar) have been working for years i.e. to copy zip file(3KB to 800MB) from samba server to appserver but since recent time copy function takes long time for a give file, sometime transfer fails.  If we map source drive (\\xxx.xx.xx.xx\abcd95\D\NJ$) from target machine (aaaaaa.bbb.ccc), using manual window copy option transfer is quick 160MB takes 3 sec, no change in implementation, Is it something would have changed on samba server/configuration?, please advise, how can we troubleshoot.

void test(){
SmbFile sFile = null;
NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication(activeUserDomain, activeUserID, activePwd);
sFile = new SmbFile("smb:"+absoluteFilePath.replaceAll("\\\\", "/"), auth);

File inFile = new File(tempZipDir,zipFileName);
DataOutputStream outZ = new DataOutputStream(new FileOutputStream(inFile));
InputStream inZ = sFile.getInputStream();

private static final void copyStreams ( InputStream in, OutputStream out ) throws IOException
     byte [  ]  buffer = new byte[1024];
     int len;
     while (  ( len = >= 0 )  {
       out.write( buffer, 0, len ) ;
     in.close() ;
     out.close() ;


This discussion has been closed.