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.


KiwiPower

18 posts

Geek


#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
jnimmo
1097 posts

Uber Geek


  #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



insane
3236 posts

Uber Geek

ID Verified
Trusted

  #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

kyhwana2
2566 posts

Uber Geek


  #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..



TwoSeven
1623 posts

Uber Geek

Subscriber

  #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).







Software Engineer
   (the practice of real science, engineering and management)
A.I.  (Automation rebranded)
Gender Neutral
   (a person who believes in equality and who does not believe in/use stereotypes. Examples such as gender, binary, nonbinary, male/female etc.)

 

 ...they/their/them...


timmmay
20574 posts

Uber Geek

Trusted
Lifetime subscriber

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

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

Batman
Mad Scientist
29760 posts

Uber Geek

Trusted
Lifetime subscriber

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

Lowest power is a laptop. What I use.

Inphinity
2780 posts

Uber Geek


  #990108 19-Feb-2014 08:37
Send private message

I'd use a NUC, personally.

 
 
 

Cloud spending continues to surge globally, but most organisations haven’t made the changes necessary to maximise the value and cost-efficiency benefits of their cloud investments. Download the whitepaper From Overspend to Advantage now.
Dairyxox
1594 posts

Uber Geek


  #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).

TwoSeven
1623 posts

Uber Geek

Subscriber

  #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.






Software Engineer
   (the practice of real science, engineering and management)
A.I.  (Automation rebranded)
Gender Neutral
   (a person who believes in equality and who does not believe in/use stereotypes. Examples such as gender, binary, nonbinary, male/female etc.)

 

 ...they/their/them...


ubergeeknz
3344 posts

Uber Geek

Trusted
Vocus

  #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?

KiwiPower

18 posts

Geek


  #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?

frankv
5680 posts

Uber Geek

Lifetime subscriber

  #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


KiwiPower

18 posts

Geek


  #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

ubergeeknz
3344 posts

Uber Geek

Trusted
Vocus

  #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.

KiwiPower

18 posts

Geek


  #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





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









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.