I am just going through the service-list of a server (CentOS 5) - the question will probably apply to other RedHat, Fedora, ... versions, too.Note that my servers normally run in runlevel 3 (no GUI server processes started).I stumbled across two services:readahead_earlyreadhahead_laterThese two services get their configuration from /etc/sysconfig/readahead.dThe purpose of these services seems to be to preload certain files into cache-memory.Browsing through the config-files (left at the default contents) I see mostly X11-related files and some libraries.What is the deeper sense of these processes? AFAIK every file will go into cache-memory after the first read-access. Why should I preload - and why should I preload all these unneeded files?IMHO this is a useless waste of read-bandwidth during start-up of the operating system.UpdateI found that these readaheads will only cache the first inode-entries for the files listed (via the fstat system call). So it just speeds up finding these files... Update 2012-10-02The question boils down to: Can I safely disable these services on a server, or am I missing something important here?I Updated the header of the question accordingly, since the given answers don`t hit the mark yet.
Can readahead-services be safely disabled?
centos;boot;rhel;init script;cache
The idea is to load these files into cache before they're needed, so that there is no need to wait for them when X is trying to start.Obviously, there isn't much point in doing this for files that aren't actually needed in the system's day-to-day operation, so for example caching the X server itself is counterproductive in your case, yes; however, you might be surprised at what can get pulled in sometimes: it's quite possible that some programs your server runs actually do pull in X11 libraries, perhaps via Cairo, so don't be too hasty in dismissing this as useless!It might be better if the system periodically traced itself at startup to figure out what to precache (and when); Windows does something of the sort.  (It also does this on a per-exe basis for process startup; I've actually seen the kernel pulling stuff into cache early after consulting its records about a new process's executable!)Again, this is all about reducing the time spent waiting for things to come in from storage.Edit:This is, of course, not essential.  Nothing will break if it doesn't happen (barring stupid bugs); startup timing will just be different.