Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.
Buying anything on Amazon? Please use the Geekzone Amazon aff link.




18 posts

Geek
+1 received by user: 1


Topic # 140737 19-Feb-2014 04:05 Send private message

Currently I run a small blog site from a Raspberry Pi that gets about 13,000 hits per month. The problem is that it takes the Pi 97% CPU usages for about 6 seconds to process one hit! The browser has to wait that long after every click. My other concern is the Pi barely has enough RAM to run mysql. The mysql process uses 320MB of RAM which with other things is leaving the Pi with only 49MB of free memory. It’s using that much and the blog is brand new and almost empty.

I’m researching some server hardware that would perform much better but not use much power. I’m looking for low power, low noise, but decent performance. The blog must be hosted from home because that’s what it’s all about. I'm in no rush to build this rig, I'm only researching at this stage.

First off does anyone know of a dust proof or dust resistant case? Preferably with one big slow fan that won’t make much noise. Also can you get fan less CPU coolers for Xeon CPUs?

I’m going to attempt to work out how much power a basic home server might use at idle.

20 Watts  - XEON E3-1220V3 (@idle)
5.6 Watts – 2x 4GB RAM
3 Watts   - CPU fan (@idle)
-----------------------------------------------------------
28.6 Watts but the motherboard is 90% efficient so:
31.8 Watts

8 Watts   - 1TB Seagate Constellation ST1000NM0033  OR  Essentially 0 Watts for SSD
3 Watts   - Case fan (@idle)
------------------------------------------------------
42.8 Watts with HDD  OR  34.8 Watts with SSD

RM450 PSU is 88% efficient at <20% load
------------------------------------------------------
48.6 Watts with HDD  OR  39.5 Watts with SSD

Assume $0.26c/kW Hour & 31 days a month
$9.40 /month with HDD  OR  $7.64 /month with SSD


Does this sound about right? Any ideas on how to reduce the consumption?

View this topic in a long page with up to 500 replies per page Create new topic
 1 | 2 | 3
What does this tag do
372 posts

Ultimate Geek
+1 received by user: 52

Subscriber

  Reply # 990087 19-Feb-2014 07:32 Send private message

Yeah probably sounds about right, of course it wouldn't always be idling so may be slightly higher. I thought the Xeon microserver processor was 13w idle? If you have it on a UPS as well, one way you can reduce consumption would be to use a DC UPS instead of a traditional one with an inverter

2036 posts

Uber Geek
+1 received by user: 283

Trusted
Subscriber

  Reply # 990089 19-Feb-2014 07:45 Send private message

You could use an old laptop. My old Asus W5 from 2006 would only use 9 watts with the screen dim on at idle, with the screen off I'd imagine a few watts lower and it would crunch a raspberry-pi.



UPS would be built in too if the battery still worked

2329 posts

Uber Geek
+1 received by user: 79


  Reply # 990090 19-Feb-2014 07:48 Send private message

Why not use a VPS to do this? You can get a 512MB VPS from Digitalocean for $5US a month..

846 posts

Ultimate Geek
+1 received by user: 65


  Reply # 990092 19-Feb-2014 07:51 Send private message

I think a Xeon would be a bit much as it requires a matching chipset/mainboard to maximise the IOPs.

Given that you are happy to run a web server on a PI, basically something similar with more memory so I am probably thinking a Micro-ITX based device (or a scalable Micro-ATX unit). Also, if power usage is a critical measure, then a low power CPU would be an option coupled with an SSD which would remove the I/O latency (as compared to you current disk).

Database design is all about maximising IOPS (your I/O) which is the fundamental concept behind a web server - hence I would always use an SSD in this type of system. Servicing the actual request is usually not much more than a couple of CPU cycles along with the I/O for returning the data. One can further optimise the process by using spare memory for caching (a good web server will do this) and a blog site is ideal since it is mainly static data.

The memory usage of the database is usually dependent on its content - 320Mb suggests that the database is quite lightweight - I would be looking at doing some sizing and seeing if a Micro-SSD would even be an option perhaps a 32Gb or 64Gb unit (or even a class 10 SD card).







TwoSeven

7207 posts

Uber Geek
+1 received by user: 539

Trusted
Subscriber

  Reply # 990101 19-Feb-2014 08:10 Send private message

Xeon seems over the top, Atom might even do this, or entry level i3 processor.




Asus eee pad transformer
iPod 2G
Windows 7 PC
Lots and lots of Nikon camera gear

8300 posts

Uber Geek
+1 received by user: 562

Trusted

  Reply # 990107 19-Feb-2014 08:33 Send private message

Lowest power is a laptop. What I use.

1754 posts

Uber Geek
+1 received by user: 587

Subscriber

  Reply # 990108 19-Feb-2014 08:37 One person supports this post Send private message

I'd use a NUC, personally.




Windows 7 x64 // i5-3570K // 16GB DDR3-1600 // GTX660Ti 2GB // Samsung 830 120GB SSD // OCZ Agility4 120GB SSD // Asus PB278Q @ 2560x1440
Samsung Galaxy S4 GT-I9505 w/Telecom

441 posts

Ultimate Geek
+1 received by user: 51


  Reply # 990117 19-Feb-2014 08:45 Send private message

Intel NUC haswell is sub 10watts including all components, and doing "light work" (decoding full hd movie).

846 posts

Ultimate Geek
+1 received by user: 65


  Reply # 990223 19-Feb-2014 10:44 Send private message

Inphinity: I'd use a NUC, personally.


That's what I was thinking, however, I suspect that the OP may be using apache and/or Linux, so I put Micro-ITX (or even Mini-ITX) to give a more open-source kind of solution platform.






TwoSeven

Voice Engineer @ Orcon
1999 posts

Uber Geek
+1 received by user: 472

Trusted
Orcon
Subscriber

  Reply # 990233 19-Feb-2014 10:52 Send private message

Seriously though, why do you want to host it yourself, when there's plenty of cheap and reliable web hosting out there with redundant connectivity, power, etc. and fully managed?



18 posts

Geek
+1 received by user: 1


  Reply # 990451 19-Feb-2014 13:24 Send private message

ubergeeknz: Seriously though, why do you want to host it yourself, when there's plenty of cheap and reliable web hosting out there with redundant connectivity, power, etc. and fully managed?


Where's the fun in that?

135 posts

Master Geek
+1 received by user: 41


  Reply # 990454 19-Feb-2014 13:25 Send private message

KiwiPower: Currently I run a small blog site from a Raspberry Pi that gets about 13,000 hits per month. The problem is that it takes the Pi 97% CPU usages for about 6 seconds to process one hit! The browser has to wait that long after every click. My other concern is the Pi barely has enough RAM to run mysql. The mysql process uses 320MB of RAM which with other things is leaving the Pi with only 49MB of free memory. It’s using that much and the blog is brand new and almost empty.


Hmmmm... other people seem to be able to run this kind of system on a Pi. (http://www.penguintutor.com/linux/raspberrypi-webserver has a guide on how to set up a Pi with MySQL & apache).


My first thought is about your database configuration... have you created an index to use for each type of search? If not, there will be a sequential search through every record... a guarantee of poor performance in a large database. How big is the database, BTW?

Next thought is that the performance hit is due to swapping... a large chunk of MySql is being swapped from RAM to the SDcard to make room for (I assume) apache (or some other web server), which is then swapped out when it calls MySql, which is then swapped out again when it returns its results to the webserver. I'm thinking that MySql uses practically all the RAM for a cache of some kind. Maybe look at your MySql settings and see if you can tell it to not be so greedy? Also try reducing the Pi's graphics memory to 32MB, thus giving yourself another 32MB to play with.

Next thought is that MySql may be overkill for what you're doing??? Have you looked at some other database package? MariaDB? SqlLite? I think transaction locking is the only big difference between MySql & SqlLite? If you don't allow people to do simultaneous updates, that shouldn't be an issue.

Frank




18 posts

Geek
+1 received by user: 1


  Reply # 990473 19-Feb-2014 14:02 Send private message

frankv:
KiwiPower: Currently I run a small blog site from a Raspberry Pi that gets about 13,000 hits per month. The problem is that it takes the Pi 97% CPU usages for about 6 seconds to process one hit! The browser has to wait that long after every click. My other concern is the Pi barely has enough RAM to run mysql. The mysql process uses 320MB of RAM which with other things is leaving the Pi with only 49MB of free memory. It’s using that much and the blog is brand new and almost empty.


Hmmmm... other people seem to be able to run this kind of system on a Pi. (http://www.penguintutor.com/linux/raspberrypi-webserver has a guide on how to set up a Pi with MySQL & apache).


My first thought is about your database configuration... have you created an index to use for each type of search? If not, there will be a sequential search through every record... a guarantee of poor performance in a large database. How big is the database, BTW?

Next thought is that the performance hit is due to swapping... a large chunk of MySql is being swapped from RAM to the SDcard to make room for (I assume) apache (or some other web server), which is then swapped out when it calls MySql, which is then swapped out again when it returns its results to the webserver. I'm thinking that MySql uses practically all the RAM for a cache of some kind. Maybe look at your MySql settings and see if you can tell it to not be so greedy? Also try reducing the Pi's graphics memory to 32MB, thus giving yourself another 32MB to play with.

Next thought is that MySql may be overkill for what you're doing??? Have you looked at some other database package? MariaDB? SqlLite? I think transaction locking is the only big difference between MySql & SqlLite? If you don't allow people to do simultaneous updates, that shouldn't be an issue.

Frank



I forgot to mention, the database is for WordPress. And also I have no GUI I use SSH terminal. The pages have comment submission so they are dynamic. Swap used is 0KB of 102396KB

Voice Engineer @ Orcon
1999 posts

Uber Geek
+1 received by user: 472

Trusted
Orcon
Subscriber

  Reply # 990479 19-Feb-2014 14:10 Send private message

KiwiPower:
ubergeeknz: Seriously though, why do you want to host it yourself, when there's plenty of cheap and reliable web hosting out there with redundant connectivity, power, etc. and fully managed?


Where's the fun in that?


You have a point.  However I'd look into optimising things a bit before shelling for new hardware, sort out why MySQL is using so much RAM and whether you can reduce it, why page renders are taking so long, see what fat you can trim in terms of other things running on the box, etc.  You'd be surprised (especially with low powered devices) how much you can squeeze out with some optimisation.  The suggestion of ditching MySQL and going to SQLite may be a good place to start.  Oh and something like cloudflare to offload anything not needing dynamic updates.



18 posts

Geek
+1 received by user: 1


  Reply # 990482 19-Feb-2014 14:16 Send private message

ubergeeknz:
KiwiPower:
ubergeeknz: Seriously though, why do you want to host it yourself, when there's plenty of cheap and reliable web hosting out there with redundant connectivity, power, etc. and fully managed?


Where's the fun in that?


You have a point.  However I'd look into optimising things a bit before shelling for new hardware, sort out why MySQL is using so much RAM and whether you can reduce it, why page renders are taking so long, see what fat you can trim in terms of other things running on the box, etc.  You'd be surprised (especially with low powered devices) how much you can squeeze out with some optimisation.  The suggestion of ditching MySQL and going to SQLite may be a good place to start.  Oh and something like cloudflare to offload anything not needing dynamic updates.


I will look into it :) These are all great ideas I wouldn't have thought of. 

 1 | 2 | 3
View this topic in a long page with up to 500 replies per page Create new topic




Twitter »
Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





Trending now »

Hot discussions in our forums right now:

Click Monday Deals
Created by mrtoken, last reply by Krishant007 on 24-Nov-2014 17:11 (25 replies)
Pages... 2


Gull Employment Dispute.
Created by networkn, last reply by Geektastic on 26-Nov-2014 16:35 (142 replies)
Pages... 8 9 10


Gigatown winner town and plans
Created by freitasm, last reply by joker97 on 27-Nov-2014 07:39 (45 replies)
Pages... 2 3


HP Stream 7 arrives
Created by gnfb, last reply by gnfb on 26-Nov-2014 22:49 (19 replies)
Pages... 2


The Warehouse pulling R18 games and DVD's
Created by semigeek, last reply by mattwnz on 26-Nov-2014 16:13 (56 replies)
Pages... 2 3 4


Lollipop no more
Created by ronw, last reply by kiwitrc on 26-Nov-2014 13:44 (13 replies)

Knock off electronics in The Warehouse
Created by jpoc, last reply by openmedia on 26-Nov-2014 13:01 (13 replies)

Letter from Vodafone Speed Decrease WTF
Created by rokki, last reply by rokki on 27-Nov-2014 04:43 (22 replies)
Pages... 2



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.

Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.