Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In particular, I'm wondering if there are any patches or config adjustments made to the disk cache size in the server edition. I'm running on a small system (256M RAM), and would like to experiment with keeping the disk cache size smaller so that there's more memory available for applications.

I've found this page at Ubuntu's website, which neither answers my questions nor is about the 9.04 release.

share|improve this question
up vote 4 down vote accepted

I'm guessing the difference is mostly in the fact that the server kernel is not preemptive, like the desktop kernel is. This is a bit complicated:

Preempting means kicking process A from the CPU in favor of process B, in simple terms. End-users expect a responsive system. Therefore, a desktop will run a preemptive kernel, which can favor user interaction above running programs. This means that the kernel can 'kick' a background program, favoring a user program by granting it runtime on the CPU, even before the background program's timeslice is over and before the background program yields the CPU.

A server on the other hand, is built to run a couple of programs in the background (like Apache) and not to interact with a user. Therefore, a server will run a non preemptive kernel, and so be optimized for running programs in the background.

You can read a bit about Ubuntu kernel configuration here. The article is a couple of years old, but I'm pretty sure the preemption bit is still one of the biggest differences between Ubuntu's desktop and server kernels. Another difference is the choice of I/O scheduler: the server uses the deadlines scheduler, the desktop the CFQ. Admittedly, I took that from the linked article.

As for disk cache, Linux caches. Period. Linux will happily use all of your RAM as disk cache. It doesn't matter if you have 512MB of RAM or 1GB of RAM: Linux will use it if it sees fit to. There is not tweaking of this that I am aware of.

Also know that there is no downside to this: as your programs require more RAM, less RAM will be used for cache. The fact that your VM has 256MB only and that some of that is used as cache, will not hamper performance of your programs: if the programs request RAM, they will get it instantly, at the cost of having less cache. That is a Good Thing TM. Again: memory used as cache is still available to your applications. It will be reclaimed instantly and giving to a memory hungry application if the kernel thinks that appropriate. Running a different kernel will not change this.

share|improve this answer
OK, that makes sense (re: caching). Is it true that if there are cached pages that are "dirty", they'll have to be flushed to disk (or to the disk's hardware cache) before the memory can be reclaimed for application usage? – dcrosta Sep 30 '09 at 15:26
You are mistaking cache for buffers there. Buffers would show that behaviour, I guess. Buffers are pages in memory waiting to be written to disk, a sort of 'write cache', whereas what you see as 'cache' in the output of 'free' is 'read cache': pages read from disk that remain in memory for convenience sake. – wzzrd Sep 30 '09 at 15:33
Ah, thanks. Some of this jargon is fairly confusing. – dcrosta Sep 30 '09 at 16:06
I believe there is one important tunable parameter that relates to cache. The swappiness (/proc/sys/vm/swappiness). This decides to what degree application memory will be swapped out to allow for more cache. – Roy Oct 8 '09 at 18:41
Hmm, "a desktop will run a preemptive kernel" while "a server will not run a non preemptive kernel". Either there is no difference or one of these assertions should be corrected (presumably the second one). – jlliagre Nov 15 '11 at 9:53

It appears that mostly the differences are related to the clock, pae, and xen.

--- config-2.6.28-15-generic    2009-09-09 05:56:49.000000000 -0700
+++ config-2.6.28-15-server 2009-09-09 06:13:24.000000000 -0700
@@ -3659,7 +3659,7 @@
-CONFIG_VERSION_SIGNATURE="Ubuntu 2.6.28-15.52-generic"
+CONFIG_VERSION_SIGNATURE="Ubuntu 2.6.28-15.52-server"
@@ -3932,34 +3932,41 @@
 # CONFIG_ZONE_DMA32 is not set
-# Config options for config.generic automatically generated by
+# Config options for config.server automatically generated by
-# CONFIG_DMATEST is not set
-# CONFIG_HIGHMEM64G is not set
-# CONFIG_HZ_100 is not set
-# CONFIG_LGUEST is not set
-# CONFIG_M686 is not set
-# CONFIG_PHYS_ADDR_T_64BIT is not set
-# CONFIG_RESOURCES_64BIT is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_HIGHMEM4G is not set
+# CONFIG_HZ_250 is not set
+# CONFIG_M586 is not set
+# CONFIG_X86_DS is not set
+# CONFIG_X86_E_POWERSAVER is not set
+# CONFIG_XEN_DEBUG_FS is not set
share|improve this answer

One important thing I found when trying to use >2GB of ram on my laptop, which was running 32 bit Ubuntu with a desktop kernel. Replacing the desktop kernel with a server kernel, enabled PAE, so it could address more memory. In the end, I ended up putting 64 bit Ubuntu on it instead.

share|improve this answer

An update since this has changed in Ubuntu 12.04 Precise:

Since 12.04, there is no difference in kernel between Ubuntu Desktop and Ubuntu Server since linux-image-server is merged into linux-image-generic.


Discussion about this can be found on:

share|improve this answer

Your Answer


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.