[Samba] Samba - XP performance problem

Jeremy Allison jra at samba.org
Wed Aug 10 16:11:27 GMT 2005


On Wed, Aug 10, 2005 at 11:05:06AM +0200, David Beck wrote:
> Thank you for the suggestion. I'll keep the info for reference.
> 
> Followup for the performance issue:
> 
> The trace shows that the conversation changes right after the "trans2: 
> query file info internal" stage, so I looked into the samba code at this 
> file:
> 
> http://websvn.samba.org/cgi-bin/viewcvs.cgi/branches/SAMBA_3_0/source/smbd/trans2.c?rev=8959&view=markup
> 
> 		case SMB_FILE_INTERNAL_INFORMATION:
> 			/* This should be an index number - looks like
> 			   dev/ino to me :-) 
> 
> 			   I think this causes us to fail the IFSKIT
> 			   BasicFileInformationTest. -tpot */
> 
> 			DEBUG(10,("call_trans2qfilepathinfo: 
> 			SMB_FILE_INTERNAL_INFORMATION\n"));
> 			SIVAL(pdata,0,sbuf.st_dev);
> 			SIVAL(pdata,4,sbuf.st_ino);
> 			data_size = 8;
> 			break;
> 
> The comment speaks for itself. I suspect the 8 byte here contains some 
> magic that makes XP behaves as I found.

Hmmm. Good detective work. One thing I'd like to check though - can you try the
following (not production) patch and recompile and test please ? I'm 
still at LinuxWorld and so won't be able to get to this until tomorrow
at the earliest.

If this fix makes things go faster I have a working theory...

Jeremy.
-------------- next part --------------
Index: smbd/dosmode.c
===================================================================
--- smbd/dosmode.c	(revision 9229)
+++ smbd/dosmode.c	(working copy)
@@ -22,11 +22,13 @@
 
 static int set_sparse_flag(const SMB_STRUCT_STAT * const sbuf)
 {
+#if 0 /* JRATEST */
 #if defined (HAVE_STAT_ST_BLOCKS) && defined(STAT_ST_BLOCKSIZE)
 	if (sbuf->st_size > sbuf->st_blocks * (SMB_OFF_T)STAT_ST_BLOCKSIZE) {
 		return FILE_ATTRIBUTE_SPARSE;
 	}
 #endif
+#endif
 	return 0;
 }
 


More information about the samba mailing list