LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 07-01-2009, 08:05 AM   #1
Niraj Kulkarni
LQ Newbie
 
Registered: May 2008
Posts: 19
Thanked: 0
EXT2 or FAT32


[Log in to get rid of this advertisement]
Hi,
I am using FAT32 formated pen drive/HDD on Linux 2.4.
Now I need to store more than 32GB data.
So I decided to use ext2 formated HDD.
But write time on ext2 is much larger than FAT32.
HOW CAN I IMPROVE WRITING THROUGHPUT OF EXT2 FS

Niraj
Niraj Kulkarni is offline  
Tag This Post , ,
Reply With Quote
Old 07-01-2009, 09:49 AM   #2
camorri
Senior Member
 
Registered: Nov 2002
Location: Toronto Canada
Distribution: Mandrake 9.2 Mandriva 2008.1 & 2009.1 Slackware 12.1 , Knoppix.
Posts: 2,573
Thanked: 56
Write time to a drive depends on a lot of factors, not just the file system type. Ext2 is not slow by its nature.

You did not state the type of drive, sata, ide etc. Is it internal or an external drive? If it is external, what type of connection do you have?

It is possible to 'tune' HDD performance on some drive types. There is a utility called hdparm. Be cautious, do some reading before you use it. It can be dangerous, and can cause loss of data. There are tutorials on the web on how to use it. I have used it on IDE drives, but be careful. Back up all data before you decide to use it. If you do the wrong thing, you can loose all your data.
camorri is offline     Reply With Quote
Old 07-01-2009, 10:19 AM   #3
Niraj Kulkarni
LQ Newbie
 
Registered: May 2008
Posts: 19
Thanked: 0

Original Poster
ext2 takes time than fat32

Hi ,
thanks for quick reply. here are the datails you require

* ped drive : external , normal data traveller. 2GB.
* No other transaction on USB bus.
* Time for 1MB data in chuncks of 64KB
FAT32 = 1.9 sec.
EXT2 = 6.6 sec.
Above observations shows ext2 write many other things along with actual data.
Niraj
Niraj Kulkarni is offline     Reply With Quote
Old 07-02-2009, 07:47 AM   #4
Niraj Kulkarni
LQ Newbie
 
Registered: May 2008
Posts: 19
Thanked: 0

Original Poster
Hi,
I also understand that
* in ext2 fs the complete space is divided in "n Groups".
* each Group has : super block , group descriptor,blk bitmap etc.
* Now the fs must update these super block + group decriptor after every Group (4096 KB max)is filled up .
Is this the reason for delay.

In case of FAT32
I can see only one write after actual data write.

All logs seen on CATC.

Can I some how tell the file system to update superblock etc at the end.
"noatime" during mount did not serve the purpose.
Please help.....
Niraj
Niraj Kulkarni is offline     Reply With Quote
Old 07-03-2009, 02:46 AM   #5
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 5.4
Posts: 7,429
Thanked: 325
Exactly which distro and version on Linux have you got?
'Linux 2.4' doesn't really tell us anything.
If that's the kernel version

uname -a

then that's really old. All the current ones have 2.6.x
chrism01 is offline     Reply With Quote
Old 07-03-2009, 04:36 AM   #6
Niraj Kulkarni
LQ Newbie
 
Registered: May 2008
Posts: 19
Thanked: 0

Original Poster
Hi,
I am using Linux 2.4.18.
I also understand the "Block size" with which i format my pen drive in ext2 also matters.By default it is 4096 Bytes.And some thing related to
"block bit map" and "Inode bit map" come into picture.

I need to write 1MB data in less than or equal to 2 sec.
Niraj Kulkarni is offline     Reply With Quote
Old 07-06-2009, 03:40 AM   #7
Niraj Kulkarni
LQ Newbie
 
Registered: May 2008
Posts: 19
Thanked: 0

Original Poster
Superblock in ext2

Hi,
I have got a general idea about how ext2 fs works. Like there is the Superblock , Inode structure , Group descriptor etc.

In the Inode structure : Direct blocks , Indirect blocks , double indirect blocks.

I figured out how after "12" direct blocks are used up how the Indrect block comes into the picture.

Can any one tell me that : I can see the Superblock is read once while mounting the pen drive. wether the Superblock is modifed or not. If so at what time it is modified.
Niraj
Niraj Kulkarni is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Format Pen from ext2 to fat32 drkanna217 Linux - Newbie 1 12-24-2008 05:25 AM
Converting FAT32 to Ext2 PetruM Ubuntu 2 07-27-2006 10:01 AM
ext2 and fat32 gag Linux - Newbie 2 10-16-2003 04:02 PM
Fat32, Ext2, Swap???? darxoul Linux - Software 4 07-09-2003 02:38 PM
Reformating ext2 to fat32 ealedesma Linux - Hardware 1 06-08-2003 09:07 PM


All times are GMT -5. The time now is 04:58 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration