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.