There are many reasons why people decide to host their web projects on notebooks. Either way, the question is not why, but how. Like everywhere else, there are pros and cons in hosting of your web application on notebook hardware, so we are going to discuss here how to do it properly and get most out of it.
Possible reasons to host your web server on a notebook
Usually people think about hosting on notebook, for one or many of these reasons:
- The price of hosting is higher than expected revenue, or no profit is expected.
- There are less than 1000 users expected to use this web project.
- The web application is not consuming much of resources.
- Notebook is powerful enough.
- You can’t sell this old notebook, but also don’t want to refurbish it, as it is still working as designed. And now you have this web project of yours that needs cheap hosting.
- Your internet connection is fast and reliable and you see no reason or have no resources to acquire new hardware and data center (DC) allocation.
- You want to host the web application on-site but want to keep your electricity bill at minimum.
- You have to make your server mobile.
Why it is not advised to host web server on a notebook
If you will ask this question in forum of some “hosting experts”, they will usually not dig into the reasons of why this is a bad idea, most likely you will hear something like “better get [something else] than use a notebook, using a notebook for web hosting is a bad idea”. Perhaps you will hear about overheating. So now, when you know what “experts” are going to tell you, let’s dissect all possible cons of notebook-based hosting.
Overheating
As you know, notebook cases are thin, while PC cases are thick, so the airflow inside the notebook case is very limited. The problem arises when this limited airflow channel is filled with dust. And this means that you’ll have to schedule case cleanup at least once per year. In most laptop designs, this means you’ll have to remove the back cover and use pressurized air to blow out the dust. Also, once per about 3 years you’ll have to change the thermal grease on CPU, and you’d better use the best one, like the one from Zalman.
The argument that you should be afraid of the video card overheating is nonsense, this problem only arises when you are using notebooks for their intended purpose. When you are using notebook as web server, the GPU is idle, because the screen is off and no graphical information is processed.
Anyway, using notebook with simple embedded graphics unit is preferable mainly because of the low power consumption.
The overheating problem comes mainly from the battery unit, not from the CPU. Make sure the battery is either new or detached. Notebook can work on AC power without the battery, although that would eliminate one of the pros of notebook hosting – it’s prone to power outage.
Before installing notebook for hosting, meaning that notebook will work 24/7 in unattended mode, check the internet whether someone ever had a problem with overheating of that model of the notebook. If, for example, there were cases when the battery experienced overheating or even exploded, then just remove it. Also, make sure you have a high quality power adapter which makes no noise - this usually is a sign of internal defect and that it is working close to the limit of it’s capabilities.
Overall, make sure that your notebook is not placed between other devices and there is an airflow in the room.
Performance
Hard Drive
The weakest point of notebook performance is the hard drive. Usually, but not always, there is only one hard drive installed in the notebook. But that’s not always the case, as there are notebooks with two hard drives or even more. It is always advised to have more than one hard drive on web server, for performance reason. If you want to install a second hard drive into your notebook, but there is the place for only one, check out whether your notebook has DVD drive installed. Usually there are DVD enclosures available on the market with place for one 2.5” HDD in it. You will loose the DVD drive in that case, but second hard drive is more important.
In order to keep the heat and power consumption to the minimum, you should change your hard drive to SSD one. This should also increase the performance of your web server, as notebooks are usually equipped with 5200rpm hard drives, while normal desktop computers usually have 7200rpm and servers are equipped with 10000rpm and more. There are 7200rpm hard disk drives for notebooks, but SSD are much more preferable. Usually, 64Gb SSD drive is perfectly enough for a Windows web server. Linux could live well on 8Gb.
If you have two internal hard drives, I would advise to create a software RAID-1 (mirror) made of two partitions, one per each hard drive, especially for web server contents files. This will increase the read speed of your files and provide the fail protection in case one of the hard drives would die.
CPU
Frankly, I see no problems with mobile CPUs used in web server. There are perfect examples of production web servers running on Intel Atom processors, the same as installed in Asus netbooks. And netbooks are even less powerful than most notebooks. Having low TDP, the mobile processors are ideal for low CPU consuming web applications, such as forums, blogs or image galleries.
It is preferable, although not necessary, that your notebook is equipped with multi-core CPU. If it has 4 cores or more, or has 2 cores with hyper threading enabled (so you see 4 virtual cores when you look at CPU load), it’s better to
Network
Most notebooks are having one LAN interface of up to 1Gbit. In data center, you would use two redundant network interfaces, but here it’s all you’ve got. However, I haven’t seen any problems with NICs of notebooks, even when used for transferring huge amounts of data 24/7. So, you shouldn’t worry about it either. In case your embedded NIC is dead, you can always resort to external one – either PCMCIA or whatever is available for your configuration.
So, overall, nothing is keeping you from hosting a relatively small web project on your notebook until it becomes profitable enough for professional hosting. Now, let’s talk about the pro’s of such solution.
What are the benefits of running your website on a notebook
First of all – it’s all-included solution. You always have screen, keyboard and mouse on site. When you have a professional server located at the data center, you need to borrow a screen and keyboard, although they are usually available. Anyway, here they are always with you.
Battery provides you with powerful UPS, capable of surviving up to few hours. Of course, if you are hosting your website at home, and suddenly the power supply is interrupted, your internet connection will be lost as well, but you won’t loose data, and if the interruption was short, your website won’t be stopped, even though will go offline.
Size could be important as well, if you are hosting in a small apartments. The same is with the noise, which in case of notebook is much more tolerable, in case you have to sleep in the same small room.
If you are using Dynamic DNS and constantly geographically relocating your web server, there is no better solution than having a notebook as your web server.
Are there sort of best practices for hosting website on a notebook?
On every circumstances there are best conditions, when your solution will work best. In case of such unusual thing as hosting a website on a notebook, there are few recommendations as well.
- Favor operating environment with lowest footprint possible. If you want to host something that is not OS-dependent – for example, PHP website which could be run on either Windows or Linux, choose Linux if that’s possible, as it will take less resources and will allow you to server more clients.
For example, the WordPress blog platform can be installed on both Linux or Windows.
- Have external hard drive or online service for storing backups. Regularly backup data, through scheduled tasks (either Task Scheduler in Windows or Cron in Linux / Unix). If that’s a blog we are talking about, then perform backup after each post.
- Favor less dependent applications. For example, if application can work with or without database server installed, prefer configuration without the database server, to decrease the load on resources.
- Avoid using database server unless necessary. Database servers are usually very data intensive, although having MySQL for hosting simple forum won’t hurt even old Celeron-based notebook.
- Fire safety first! Make sure your plastic notebook is not laying close to flammable materials and in case of catching fire there are people nearby to extinguish the flame.
Keep the fire extinguisher close to your notebook, it’s not a joke. Small fire extinguishers are cheap and you should have one in case you are keeping your notebook-hosted web server online for indefinite time.
- Make sure you set up the temperature control in BIOS and operating system, to automatically shutdown computer when it reaches the critical temperature. Note, that battery explodes faster, than your sensors could react and shutdown the machine. Although it’s very rare case, you don’t want that to happen to you and at least these sensors will help you to keep the peace of mind.
- Set up alerts for situations when your CPU is loaded for more than 90% for a relatively long time. Also, you could set your IIS (Internet Information Server – web server of Windows) to recycle web application worker process when it consumes too much CPU.
- Through the Device Manager in Windows, disable all hardware your web server doesn’t need. For example – the embedded webcam, Bluetooth controller, Wi-Fi, card reader, DVD-Rom, Audio card, infra-red port. This will stop powering these devices.
- In case of Windows, bear in mind that IIS requires server operating system in order to keep more than 10 connections at a time. So, Windows Vista or Windows 7 won’t be able to serve more than 10 connections simultaneously.
Also bear in mind, that 64-bit operating systems require more memory, so if you have only 2Gb of RAM, install 32-bit OS unless 64-bit is required.
- To keep your electricity bills low, make sure your external hard drive is going into the sleep mode after 20 minutes of idle time, but also make sure that no internal devices are going to sleep unless needed.
- Make sure your internet speed, especially the Upload speed, is high enough – although it’s not the most important parameter for Google search engine ranking, it’s still better to keep your notebook on the fastest channel available.
- Switch on the traffic compression in either IIS or Apache, as the bottleneck of your solution won’t be the CPU, but the bandwidth.
Conclusion
Personally, I am not using notebooks for hosting anything, mainly because I have professional server and hosting plans at various providers. But I know some cases and even helped in establishing of environments made on the decommissioned notebooks. Some projects just don’t require an overkill hosting solutions and you could use whatever suitable equipment you have. For example - a blog with about 500 readers per day could be easily handled by Atom-based netbook, like eeePC 1015 or something. So the only reason why I am not doing this – I already have the necessary equipment and services to do the job. But if I wouldn’t – there would be no reason for me not to host at least some of my websites on a good old notebook.