Messages in this thread | | | Subject | Re: swap cache | From | Peter Moulder <> | Date | 26 Dec 1998 16:51:18 +1100 |
| |
Alain Williams <addw@phcomp.co.uk> writes:
> On Mon, Dec 21, 1998 at 11:23:11AM +0100, Rik van Riel wrote: > > The cost of I/O is in seek time and not in disk read/througput > > time. Compression will only reduce the already cheap part but > > does nothing about the expensive seek times...
If compression could make the data take up fewer cylinders on disk, and fragmentation is not greatly increased, then seek times would be reduced.
> The cost of swap I/O is sometimes much greater: eg swap over NFS as some > versions of UNIX manage. > > One related item which would be nice is to be able to keep binaries (e.g. > a.out files) compressed, decompressing them when they are run. This > would help where disk space is short and where binaries are loaded over > at network (many office networks are hopelessly overloaded). > Decompression is cheaper than compression and could help in some > situations. > > To really work well this would have to also have to work with compressed > shared libraries.
There are two issues here: disk space and network usage.
gzexe can compress executables, but not shared libraries. It would reduce network usage if the cache of decompressed binaries is kept on local storage. It works by replacing binaries with a file containing a `#! ...' line followed by the compressed original file.
e2compr (http://debs.fuller.edu/e2compr/) can compress executables, shared libaries, and indeed any regular files on an ext2 filesystem, but does nothing to reduce network usage. Also, you can't use it for swap files or files to be used as backing store by the loop driver (because the swapper and loop driver access the underlying block device instead of going through the filesystem; this is also why they can't use network filesystems). e2compr works by patching the ext2 filesystem code. It works but is is still in development.
Applying compression to network protocols is another matter. The Linux ppp driver already supports this. Adding compression to the TCP layer would be impressive, though a lot of work. Adding compression to NFS (or somewhere else in the networking stack?) might be easier.
pjm.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |