Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have ext2 filesystem installed on my work machine. I talk with my friend who knows linux a lot better and he said its very old and its very weird that I use so old filesystem.

I'm now trying to get it updated (I don't have root) to ext3.

are there any BIG reasons for that update? so I can point them out to helpdesk.

I'm java programmer and I work on a very big project (building the whole thing takes 50-90 minutes). it has a lot of small files that needs to be compiled and produce even more small files. so maybe an upgrade would help with the speed?

I also have problems with .... freezing. sometimes my computer is freezing and after 5-25 minutes its works again (I can't do anything, even switch to another console). can filesystem be responsible for that?

I'm looking for any reasons for upgrade, the more reasons I have the bigger chance that it will be upgraded.

P.S. How big are chances that I might lose data, because of errors in upgrade? (I have never done it on linux, but on windows its ... 4%?). I do have a UPS. please keep in mind that those people seems to not be very good since I have ext2 and its a new machine (9 months old)

share|improve this question
    
FYI: to get the full benefit of ext4 you need to format it as such originally, rather than "upgrade" which just involves enabling the new options. –  psusi Dec 24 '11 at 20:18
    
Are you running out of RAM? A Java project large enough to take 50 minutes to build must be consuming a lot of RAM, which could be causing a lot of disk thrashing (swap space) or CPU thrashing (Garbage collection). –  Adrian Dec 30 '11 at 16:45
add comment

4 Answers

Wikipedia covers most of this:

The big advantage of ext3 is journalling, which means you don't need to fsck every time you unmount uncleanly (e.g. power failure / kernel panic). ext4 makes fscking much faster, when you do need to.

It's hard to know whether ext3 or ext4 will be faster than ext2 for your use case. I know for some workloads they will be slower.

The freezing problem sounds like either thrashing or a dying hard drive.

Chance of data loss is minimal, assuming the person doing the upgrade doesn't do something stupid.

share|improve this answer
add comment

I would bet money that your freezing problem is not due to your ancient ext2 filesystem, but that it is related to your hard drive because I bet you are running out of RAM and the system is swapping processes out to disk. You can check free memory with the free command. If you see swap used, then that explains your problem. If you want to monitor the swap usage you can run free -s 1 or run top. Get them to buy you more RAM!

It sounds like your system is certainly due for an upgrade if it is using ext2. Most Linux distributions began using ext3 by default years ago. Upgrading to a newer filesystem is advisable because it means that you will have better data integrity in the event of a system crash because of the filesystem journaling which does not exist in ext2. Note that the filesystem journaling with ext3 may actually decrease performance slightly for some operations compared to ext2, however that small performance trade-off is worth it for the improved data integrity.

On the other hand, ext3 also gives you dir_index which does not exist in ext2; that option (enabled by default in ext3) uses htree indexing for directories which speeds up accessing directories with lots of files.

Also, another area you can look to increase performance a bit in the case of lots of small files without having to upgrade anything is to modify the mount options for your filesystem to add noatime; this turns off the feature that updates the last accessed time on files that you access. There is also a nodiratime option to do the same thing for directories, but that option is turned enabled implicitly by just using noatime. For example, if your /etc/fstab file contains an entry like this for the root filesystem:

/dev/hda2 / ext2 defaults 0 0

then modify it like this:

/dev/hda2 / ext2 defaults,noatime 0 0

While it is possible to convert ext2 to ext4, you're better off copying all your files to a backup drive (you need a backup copy of your files anyway!), install the latest version of Ubuntu and then copy your files back to the newly reformatted system (make sure the installer does not preserve your old filesystems; you want to wipe out all the old stuff).

After all this, you may still want to know the differences between ext2, ext3 and ext4; this excerpt sums it up nicely:

Ext3 was mostly about adding journaling to Ext2, but Ext4 modifies important data structures of the file system such as the ones destined to store the file data. The result is a filesystem with an improved design, better performance, reliability and features.

share|improve this answer
    
no, I still have ram. 16GB of ram! its not ram problem. I think. –  UAdapter Jan 3 '12 at 15:44
add comment

I don't see any reason to use Ext2 on a new machine. But the disadvantages aren't that big if you compare it with FAT32. So I wouldn't say that it's absolutely necessary to upgrade from ext2, but I would recommend it. The advantages are not so much speed, but more data integrity. So if you system is crashing often, it might be very useful for you. There are several benchmarks out there. Usually ext2, ext3 and ext4 don't show very big differences, but in most tasks ext4 is the fastest. If you compare them to other file systems there are bigger differences (but you can't say that one wins always). I googled this benchmark, it shows that ext4 is faster than ext3 when handling many small files.

I'd recommend you definitely to upgrade to ext4 and not only to ext3, because the file system check is much more faster. When I had to wait the file system check for my 800GB ext3 partition every 30 mounts, it took like 30 minutes. With ext4 it should be like a tenth of that, so several minutes. But note that also after converting from ext3 to ext4 only for the new files after the conversion all ext4 features can be used. So if you have enough space elsewhere or on the same disc, pack everything to a tar ball or so and write them again.

You should definitely have backups of the whole machine (system and data) before doing an upgrade of your file system. But not because the process itself is very dangerous, but more because always something can go wrong and when you change your file system that would have fatal consequences. It's difficult to estimate the risk of data loss during the upgrade process, but I'm quite convinced that human errors are more likely than any other problem during the upgrade process. If you have a backup, there is not such a big deal. I've recently upgraded from ext3 to ext4 and it took like 20 minutes. If you want to know more details about the upgrading process, you can read this about upgrading from ext2 to ex3 or this about an upgrade ext2 directly to ext4.

If the computer freezes, I'd suspect some kind of heating problem first. You can try to monitor the temperature or just try to ask your self: does it ever happen soon after turning on the computer when it's still quite cold? But this is the thing your help desk should really solve. This sounds much more important than your file system.

share|improve this answer
add comment

Ext3 has journaling but I dont think that it is good enough reason to change your existing file system. In my experience ext2 is faster than ext3, because of lack of journaling may be. Also Ext2 gives you more disk space as the journal created by ext3 takes disk space. So I wont recommend Ext3. The freezing problem you mentioned seems like a hardware issue and changing or upgrading file system wont fix it.

So if you have enough space elsewhere to backup your whole disk/partition and can afford formatting your it then go for ext4 as it has improved performance and has contiguous block allocation for large files which also improves performance.

Or if you can spend on hardware then buy your self an SSD as it will highly improve performance of compile and build.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.