Skip to contentSkip to conversation

speed up ext3 synchronous mounts

PATCH In review Andrew Morton 5 participants 5 messages Mar 24, 2002 – Mar 27, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 speed up ext3 synchronous mounts

Again, we don't need to sync indirects as we dirty them because we run a commit if IS_SYNC(inode) prior to returning to the caller of write(2).

Writing a 10 meg file in 0.1 meg chunks is sped up by, err, a factor of fifty. That's a best case.

fs/ext3/inode.c +0 -2
@@ -581,8 +581,6 @@ static int ext3_alloc_branch(handle_t *h
 			
 			parent = nr;
 		}
-		if (IS_SYNC(inode))
-			handle->h_sync = 1;
 	}
 	if (n == num)
 		return 0;

-

#1 lore raw

Hi,

Quoted 10 lines · Andrew Morton

Again, we don't need to sync indirects as we dirty them because we run a commit if IS_SYNC(inode) prior to returning to the caller of write(2).

Writing a 10 meg file in 0.1 meg chunks is sped up by, err, a factor of fifty. That's a best case.

fs/ext3/inode.c static int ext3_alloc_branch(handle_t *h · line 586

Quoted 8 lines
fs/ext3/inode.c +0 -2
@@ -581,8 +581,6 @@ static int ext3_alloc_branch(handle_t *h
 
 			parent = nr;
 		}
-		if (IS_SYNC(inode))
-			handle->h_sync = 1;
 	}
 	if (n == num)
 		return 0;

OK. This was just a relic of ages back when we had an overarching transaction spanning multiple writepages in ext3_file_write(). In that case, setting that transaction to be synchronous multiple times was no extra cost. Doing it just once at the end should be fine.

Cheers,
Stephen

#2 lore raw
In reply to Andrew Morton
Quoted 3 lines · Andrew Morton

Again, we don't need to sync indirects as we dirty them because we run a commit if IS_SYNC(inode) prior to returning to the caller of write(2).

Will this help synchronous NFS writes, at least a little? I have slow write performance on "sync" NFSv3 exports (ext3 underneath, you guessed it), kernel 2.4.19-pre3-ac4 (not really surprising, sync is slow ;-). Is it worth a try?

#3 lore raw
Quoted 10 lines · Matthias Andree
Quoted 3 lines · Andrew Morton

Again, we don't need to sync indirects as we dirty them because we run a commit if IS_SYNC(inode) prior to returning to the caller of write(2).

Will this help synchronous NFS writes, at least a little? I have slow write performance on "sync" NFSv3 exports (ext3 underneath, you guessed it), kernel 2.4.19-pre3-ac4 (not really surprising, sync is slow ;-). Is it worth a try?

if you look at the source. that kernel doesn't need the patch. Seems to have already been applied since ac1

Quoted 4 lines

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#4 lore raw
In reply to Andrew Morton
Quoted 9 lines · Matthias Andree
Quoted 3 lines · Andrew Morton

Again, we don't need to sync indirects as we dirty them because we run a commit if IS_SYNC(inode) prior to returning to the caller of write(2).

Will this help synchronous NFS writes, at least a little? I have slow write performance on "sync" NFSv3 exports (ext3 underneath, you guessed it), kernel 2.4.19-pre3-ac4 (not really surprising, sync is slow ;-). Is it worth a try?

Are you mounting the ext3 filesystem with "data=journal" and have a large journal? This will help a lot. You can also set up an external journal device to speed things up.

Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert