Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

Is there a technical definition, or at least some benchmark notion, of the word "lightweight"?

Is it just some arbitrary "doesn't consume a lot of computer resources"?

Or perhaps "the application doesn't fork new processes" (a singe process or threads-only)?

If there is no technical definition, I'll accept the answer that gives the best rules-of-thumb as whenever something is lightweight or not.

share|improve this question
Sounds morre like a term used in marketing. – Bonsi Scott Dec 30 '12 at 7:55
@BonsiScott: Haha. But search for it on this site (or look at the "Related" column to the right) - it is so frequent, why should define it or drop it. – Emanuel Berg Dec 30 '12 at 7:57

I think a good definition is probably like "If I try to use it on an old machine, it will work seamlessly."

Even if, say, a Pentium II machine is nowadays probably so old that some people will just go "but that's oooold" instead of focusing on the lightweightness, thing is: there are window managers (and perhaps simple DEs, like XFCE from before it started getting more bloated) which will run nicely on said machine. They're lightweight.

Firefox, OTOH, has memory leaks and requires several hundred megabytes in order to maintain several open tabs. It stopped being lightweight somewhere before Firefox 2 had been launched.

Your "doesn't consume a lot of computer resources" is also another possible benchmark, with this old machine benchmark, memory is usually the biggest problem: programs like LibreOffice, even if they're not slow, require more memory than, say, your average UNIX text editor (I mean stuff like Emacs, vi, nano or butterflies).

Even then, CPU usage or disk access can be another thing to consider. I dislike the new GTK file picker not only because of their UI redesigns, but also because, when I used an older machine, I also noticed one of the changes they made was to introduce file sniffing that you simply couldn't turn off. This introduced long delays every time some GTK+ application opened a file picker, especially in directories with several files. Doing ls or using the QT file picker would be quick and easy. So would Firefox with its own file picker. But, say, Firefox with the GTK+ file picker prompting for the binary to open a file with would open /usr/bin and that would take several seconds to process. Since then, I think we can say the GTK+ file picker is not lightweight. A lightweight toolkit would, perhaps, allow you to toggle off this sniffing, as it can be intensive.

"the application doesn't fork new processes", "(a singe process or threads-only)": I don't know by how much, but processes will likely be slower than threads, yes. Taking threading/several processes (even if the latter is slower than the former) into account is a good idea — unless we're talking about a program that forks a lot (say, good old bash fork bombs), they won't use that many resources, while they may improve responsiveness. One thing that may even happen is that someone who considers a program to be lightweight if it is responsive will say that a program is not lightweight if it blocks for some seconds doing something under the hood, and one way to avoid this is to have separate threads, one dealing with the UI and the other doing these things under the hood.

Lightweight can also be "just with the required features". For example, as I am not that much of a mouse or GUI person, I prefer media players that can be started with a file and just show the file with keyboard shortcuts, rather than a GUI player with lots of buttons and controls to use with the mouse. I could say mplayer is lightweight compared to its GUI versions (or to, say, vlc, although I think there is cvlc). In the end, even if this does not require that much memory or CPU resources, it can still be considered "lightweight" if you think of it as "saving screen real estate".

Many Window Managers can be said to be lightweight compared to Desktop Environments because DEs provide several applications and tools to do various things, while WMs just, well, manage windows (DEs do, in fact, have WMs as one of their components).

A small commandline tool that does some task is also lightweight compared to some GUI application offering a bunch of menus to do the same thing, especially if you have to roam through the menus and options to do something you could do quickly with one command. (Although here I may be biased, as with my old machine, these GUI tools would usually be slower, just because of the GUI.)

share|improve this answer
I like your exposition about grasping lightweight synonym to responsiveness. Intuitively that's the understanding of lightweight that i have.... – user1146332 Dec 30 '12 at 11:10
Wow, that's an exhaustive post! Only one detail, threads are obviously a way to enhance responsiveness, that's why they were included in my proposal. Multiple processes, on the other hand, may slow things down as the context switch is much longer compared to threads. – Emanuel Berg Dec 30 '12 at 12:12
@EmanuelBerg: the difference between threads and processes is extremely thin (in Linux particularly). Under normal circumstances, there isn't a measurable difference between a thread switch and a process switch (and thread vs process creation go through the same system calls; they're very nearly identical.) – Mat Dec 30 '12 at 12:39
I think it's a little unfair to say Firefox has memory leaks. Using a lot of memory isn't the same as having memory leaks, and 150-400MB (where Firefox sits for me) is quite good for a fully-featured modern web browser. – Brian Marshall Dec 30 '12 at 12:58
@EmanuelBerg: see here for more info: stackoverflow.com/questions/5440128/… ; there are things thread switching is more efficient for, just not as much as you seem to imply in the general case. – Mat Dec 30 '12 at 13:18

"Lightweight" does not have any technical definition, or any implication about consuming resources or how well it runs on older computers, or anything absolute in any sense, technical or rule-of-thumb.

But that doesn't mean it have a very clear, specific meaning:

Lightweight means lighter than something else that you might consider using.

Thus notepad is a lightweight text editor because it's lighter than Word. JSON is a lightweight data format because it's lighter than XML. A netbook is a lightweight PC because it's lighter than a PC.

share|improve this answer
Word is a word processor, not an editor, I'd say, but other than that, I see your point. – Emanuel Berg Dec 30 '12 at 12:06
Comparing Word/LibreOffice Writer (word processors) with Notepad/vim/Emacs (text editors) is comparing apples with oranges. – Renan Dec 30 '12 at 12:51
@Renan: What about grouping Emacs and vim with Notepad? ;) – Emanuel Berg Dec 30 '12 at 13:15
Indeed. :) Even then I'm comparing apples and oranges. – Renan Dec 30 '12 at 13:20
WordPad is more a lightweight version of Word... (Although say, Word 6 might still be lighter) (AbiWord is amazing though...) – Gert van den Berg Dec 31 '12 at 9:27

"lightweight" only has meaning when comparing it to something else. A thread is lighter weight than a process. Xfce is lighter weight than Gnome. Puppy Linux is lighter weight than Ubuntu.

But there are no hard and fast rules for what makes something "lightweight". In general something that is lightweight consumes less of something that's not as lightweight, but the "something" could be many things - could be CPU resources, memory, disk space, etc.

share|improve this answer

"A thread is a lightweight process" - i.e. does not have as much overhead.

This is the only usage of that word my information-science-professor ever used.

So more general if something has lower consumption of resources than "normal" it can be seen as "lightweight". ckhan goes into the same direction with his answer.

share|improve this answer
Well, people are using that word a lot, just search this site or look in the "Related" column to the right. Probably your CS professor was wise not to overuse it. – Emanuel Berg Dec 30 '12 at 20:56

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.