Using Atom 330 with server applications

Recently I've tried to bring some attention to Atom-based servers for private web-hosting. There were many skeptical about this idea: "How can cheap netbook processor work in a server?". Now some companies provide collocation for atom-based nettops for a reduced price (~30$, usual price for 1U server is around 100$), and I wanted to share my experiences after using such server for a month.

Server configuration: Acer Aspire Revo 3600 on nVidia Ion platform, Intel Atom 330 (2 physical cores, 64-bit), 4Gb DDR2-800 RAM (Ubuntu 64 managed to see just 3.2Gb, looks like BIOS issue), SSD OCZ Vertex 30Gb. I had several SSD optimizations applied: noatime mount, disabled access-logs, disabled swap – all this to extend drive life, but this is a topic for a separate article. BTW, during first month of usage I’ve spent around 0.5% of the drive resource.

I’ve left server at Agava company for collocation. "Free" features are unlimited traffic (with some restrictions), free 1 hour/day KVM, free reboots.

Performance : UnixBench

Here goes UnixBench 4.1 WHT results:
                     INDEX VALUES
TEST                                        BASELINE     RESULT      INDEX
 
Dhrystone 2 using register variables        376783.7  4769578.3      126.6
Double-Precision Whetstone                      83.1      343.6       41.3
Execl Throughput                               188.3     2114.9      112.3
File Copy 1024 bufsize 2000 maxblocks         2672.0    59159.0      221.4
File Copy 256 bufsize 500 maxblocks           1077.0    15846.0      147.1
File Read 4096 bufsize 8000 maxblocks        15382.0   657318.0      427.3
Pipe-based Context Switching                 15448.6   137070.2       88.7
Pipe Throughput                             111814.6   504798.0       45.1
Process Creation                               569.3     7158.0      125.7
Shell Scripts (8 concurrent)                    44.8      446.9       99.8
System Call Overhead                        114433.5  1731146.5      151.3
                                                                 =========
     FINAL SCORE                                                     118.1

Before comparing to other VDS servers , you should consider that unixbench does not care how much memory you've got. Also, some VDS gives you "bursted" CPU during idle-hours and you will get too high results.

As you might noticed, the weakest point of Intel Atom is dual precision math - fortunately it is very rarely used in web-server-related software. Probably Intel just emulated dual precision math to save some silicon.


Performance : Web-applications

I’ve installed Apache2+MySQL5+PHP 5.3+APC, nginx on the server. Apache2 was set in prefork mode with 4 child processes: less than 4 processes were unable to produce 100% system load, and therefore less performance. More than 4 processes – also slightly lower speed. (I.e. optimal child count – number of CPU cores with hyper-threading). Nginx handles request queue, and he is very efficient at this task. MySQL was set up to eat around 0.7Gb of RAM. PHP sessions are in memcached.

So, under any load Apache+MySQL+PHP does not takes more than ~1Gb of RAM.

NB: During data import into MyISAM table with 400'000 rows and 2 indexes MySQL was handling 1000 separate insert requests per second from PHP.
Load tests were done on my home page http://3.14.by/ru/ - 6 SQL queries, light PHP), and on PhpBB 3.0.6 forum, with APC opcode caching. PHP/MySQL/Apache2/nginx were manually optimized. Requests were sent from separate server in the same city (45 concurrent requests).

For comparison I’ve used shared hosting server at night (with ~0 load, eu107.activeby.net), with clustered MySQL on separate servers. 12Gb of RAM, Xeon E5410 (4 cores), 2.33Ghz. Apache2, PHP5.2, eAccelerator, nginx.
Atom 330Shared Xeon E5410
http://3.14.by/ru/
6 SQL requests, light PHP
240 RPS198 RPS
http://3.14.by/forum/
PhpBB 3
30 RPS21 RPS
*RPS – requests per second

Why Atom won? Local MySQL+large caches in RAM for just a couple of sites, not thousands. Manually tuned software.

Conclusion

Some might still argue the usability of Atom-based servers, but here is the fact: my server works ideally, lightening fast, A LOT of RAM, absolutely no any disk slowdowns (which is often on VPS), fast network (separate 100Mbit/s connection to router), low pings (0.4-4ms on Moscow, 20ms to Belarus).

But, you should remember that it might get broken – hardware likes to do that in the night when no one is looking. There is just 1 mechanical piece (CPU fan), so this should be theoretically more reliable than usual servers. From the other side, if something happens – you always know when exactly your problem is going to be fixed.

This is a nice example of technological progress slowing: today even low-end solution might be perfect at good fraction of tasks: light web-server, file-server (even for 1Gbit/s), static files serving (even for 1Gbit/s), media streaming (even for 1Gbit/s).

Personally, I am absolutely satisfied with my Atom-based server

Future

Next year (2010) we will see next generation of Atom processors : Pineview (32nm). It’s main feature would be integrated single-channel memory controller. No sure what is better, integrated single channel (probably limited to 2Gb of RAM), or dual channel in chipset. Definitely it would have lower power consumption, but not sure it Is going to be perfect small server processor.

What I would really want to see is mass-produced ARM-based small servers. For example, Cortex-A9 MPCore already looks awesome in terms of power consumption, performance and price/speed. It is not a problem to run a server on ARM architecture, as servers are on Linux mainly, which runs on ARM perfectly now (Ubuntu have official ARM version for example). Probably without SIMD to save space, not sure it gives reasonable performance gains on server apps. Also, probably it is worth to have emulated FPU.

Also, it would be great to have ALOT of RAM slots in mid-end servers – 2Gb modules are going to be the cheapest ones for quite a long time, why can’t we have 8-16 slots in low-cost systems? Why so many? Because RAM is cheap, and we need to cache as much as possible. On x86 there is a monopoly, on ARM you have much more freedom to do this

Update: Dell is not sleeping. Looks awesome, but a little expensive (400$ in bulk)!

RSS@BarsMonster3@14.by