I am using the latest Lubuntu on an Intel Celeron 1.7Ghz and 512MB RAM. Lately system performance has deteriorated significantly.

The hard disk is an 80GB IDE drive and we suspect it to be the cause. What is the optimal swap size and is "defrag" recommended?

# df -k
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/sda1       76415040 5607304  66926008   8% /
udev              242220       4    242216   1% /dev
tmpfs              99800     764     99036   1% /run
none                5120       0      5120   0% /run/lock
none              249492     380    249112   1% /run/shm
  • After seeing your df file system report, I can say that you are barely taxing that drive. Definitely look into increasing your RAM. – Aaron Apr 16 '13 at 4:15

What is the optimal swap size

There's an old rule of thumb that says you make this equal to twice the size of your RAM. Here is an article explaining why that's not necessarily the case (any longer). Opinions may vary, but for a typical desktop install, you shouldn't need to go much beyond 2GB. You might need more if you're doing Linux kernel development or planning on using "suspend to disk." But if you are not a very experienced Ubuntu/Linux user, as long as you accepted the value suggested by the installer, you should be ok. But in your case I think the bigger problem is a low amount of RAM (512MB).

is defrag recommended?

The short answer is "it depends," but it is usually not something most Ubuntu users need to concern themselves with. This article "Why doesn't Linux need defragmenting?" does a really good job of explaining this topic.

How much disk space is available on your machine? Edit your post with the results of a df -k, and we'll take a look. But I suspect that your bigger problem is the half-gig of RAM. I would look at increasing that, if possible.

  • i have updated the command info – Ubuntuit Apr 15 '13 at 15:24

i'm agree to bryce: the best size of swap is... 0!

A bit more RAM make swap useless, unless you use hight definition video/photo editing (just to don't let die some hard recoding), or if you use hibernation option...

A bit more ram (or less program running parallel) is the best choice to tune up your sistem

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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