-1

Possible Duplicate:
Can you help me with my capacity planning?

I'm writing a highly computationally-intensive system that crawls Web-pages, processes them and dumps results into MongoDB. I'd like to pick OS that will use as little resources for itself as possible and provide high performance for my app. Which OS type / version / build would you recommend?

  • 1
    The OS is probably irrelevant to you. Unless your code, hardware, network and environment are perfect you can pretty much guarantee the OS will never be the bottleneck. Pretty much any server Linux OS (RHEL, Debian, Ubuntu Server etc.) with some tweeking of the system settings will be fine. I'm fairly certain MongoDB will become a bottleneck before the OS does. – Smudge Nov 29 '11 at 11:13
  • @sam: I understand it won't be a bottleneck, but I thought some OSes are _slightly_ faster than others. – Violet Giraffe Nov 29 '11 at 11:18
  • 1
    @VioletGiraffe: There is no OS that is globally faster than all others, it always depends on the particular program you want to run. So you will have to do your own benchmarks. – Sven Nov 29 '11 at 11:52

2 Answers2

2

If I were you, I will use any Linux distribution without GUI. This will help you save more from the PC resources. However, your application should be runnable from the command line (CLI) as there will be not GUI at all.

Of course, your application should be also runnable on the chosen OS.

Khaled
  • 35,688
  • 8
  • 69
  • 98
  • I can compile my app for any OS (Linux/Mac/Win, a least), and Mongo also is available for all major platform. Thanks for the suggestion, I was thinking Linux with CLI myself. – Violet Giraffe Nov 29 '11 at 11:18
  • I also wonder if there any tools for monitoring system load without GUI. And does it make any sense to take, say, Ubuntu server (GUI-less), install Gnome to setup the system easily, and then uninstall Gnome? – Violet Giraffe Nov 29 '11 at 11:23
  • 1
    You can use any of the many system tools: `top`, `htop`, `vmstat`... For the installation part, the wizard is easy to use even for server edition. – Khaled Nov 29 '11 at 11:26
  • An OS will never compensate for slow code, therefore he should focus on the application and not on OS selection. It is usually the `algorithms` that are evolving so they become faster and not the `algorithm running OS-s`. – karatedog Nov 29 '11 at 11:32
  • @karatedog: I absolutely realize that. I just want to get every possible bit of performance to my app since it will be running on resource-limited desktop. – Violet Giraffe Nov 29 '11 at 11:55
  • @karatedog: The OP is asking about possible differences (if any) in relation to the OS the application is running on. He is not asking about algorithms. Otherwise, you should ask this on stackoverflow not here! – Khaled Nov 29 '11 at 12:07
  • @Khaled: Substitute `algorithms` to `whatever the application does`. Sry for the ambiguity. To avoid further misunderstanding and to answer you, my experience is that there is no _significant_ relation to the OS when measuring application speed. Which means about 1-2% speed difference. I just thought about that we could measure game speeds that are developed for multiple platforms (OS X and Windows). Their code will not be 100% the same, but it is very unlikely that they are completely rewritten. – karatedog Nov 29 '11 at 12:28
0

An OS has almost nothing to do with the speed of your application, if that application is properly designed.

If you design your software speed-wise, then you should select the appropriate programming language. The lowest level and fastest would be Assembly, but there may not be enough knowledge 1. to create code, 2. to use higher level functions (like database operation) and development & debugging would be cumbersome and the application will not be cross compatible between OSs.

If you choose a compiled language that would run fast enough and would allow access for easier DB operations, but it might need a specific development environment, and some optimization. Between OSs you would have to recompile the application.

If you select an interpreted language, you may develop your program very fast, DB access would be available with no effort (if there is available library), but the nature of the interpreted languages is that they usually run slower than compiled languages. But you could try your application on a different OS without modification.

Every solution comes with advantages/disadvantages but the OS is indifferent (in terms of speed). For example a for loop from 1 to 256 million is finished within 1 second in C but it takes 35 seconds to complete in Ruby.

karatedog
  • 276
  • 2
  • 10
  • OS has quite much to do with the speed once your system becomes more complicated than a `for` loop. I'm a desktop programmer, I know what I'm talking about. At the very least memory consumption differs dramatically for different OSes (even different builds since the they have different set of out-of-the-box services etc.). – Violet Giraffe Nov 29 '11 at 11:35
  • Based on the original problem I don't see any bottleneck in currently known operating systems (in the world of Intel/AMD). If he asked for how to open 5 million files at the same time, I would have answered that he need specific hardware (and OS). The solution to the original problem does not need any GUI, I wonder how even a GUI can participate in anything that is 'computationally-intensive' which should be entirely invisible to the user. So if you mean the GUI needs much more RAM then you are right, but the problem is about how fast a web-crawling/processing/dumping can execute. – karatedog Nov 29 '11 at 11:44
  • 1
    Just an example. Same OS, same, and simple problem, different language, very different execution times: http://shootout.alioth.debian.org/u32/performance.php?test=mandelbrot If you take off the extremes, execution time still varies from 30 seconds to 30 minutes. – karatedog Nov 29 '11 at 11:54
  • Of that I am quite aware (again, I'm a programmer myself!). What I'd like to see is a comparison of the same program on different OSes. – Violet Giraffe Nov 29 '11 at 11:58
  • That would be useful just to see if there are differences (I don't think so, but I'd like to see such a list). But if you think about Operating Systems as complex software themselves then you've got a much more comprehensible comparison. For example on a MacBook Pro you can compare OS X and Windows 7 (their speed difference is 1% though). – karatedog Nov 29 '11 at 12:10