![]() ![]() ![]() |
|
#include <standard.disclaimer>
andrewNZ: What about your internet connection? it might be a significant bottleneck itself.
ubergeeknz: Oh and it's Wordpress right? So the first place to look (after moving your DB to SQLite) should be plugins... some of these suckers are very inefficient and slow things down a lot. Killing some plugins got my site from an 11s page load time down to about 3s.
KiwiPower:ubergeeknz: Oh and it's Wordpress right? So the first place to look (after moving your DB to SQLite) should be plugins... some of these suckers are very inefficient and slow things down a lot. Killing some plugins got my site from an 11s page load time down to about 3s.
It has taken that long to load before I started using any plugins but if you want to know I'm currently using:
Akismet
Who Hit The Page - Hit Counter
WordPress Hit Counter
Can you run through what I lose in mysql lite?
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.
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...
TwoSeven:
MySQL isn't really the issue I don't think - given the memory foot print. Your current device appears by the description to be I/O constrained - I suspect better performance might be achieved by replacing the HD with an SSD and run a larger swap file. On top of this one can increase the memory aperture (its a technical way of saying out more ram in).
The query engine in a database is not really that much of an overhead as such - more so I would suggest that the main tuning factor is "distance to the data". A mechanical drive has a latency way higher than an SSD and assuming one is using Sata III, a higher number of IOPs.
Hence my feeling is probably an SSD to see what kind of improvement can be gained and at least that can be taken to any new system.
I don't know what the size of the database is, but you could consider an experiment using either an SDHC card or a USB memory stick (in a USB slot) since both are effectively SSDs (just in a slightly slower package). I don't know anything about the PI, but I am wondering if it is possible to install Linux on a USB memory stick and store your DB on an SDHC card - giving the ability to remove the normal HD from the system - at least it might reduce power a bit.
deadlyllama:TwoSeven:
MySQL isn't really the issue I don't think - given the memory foot print. Your current device appears by the description to be I/O constrained - I suspect better performance might be achieved by replacing the HD with an SSD and run a larger swap file. On top of this one can increase the memory aperture (its a technical way of saying out more ram in).
The query engine in a database is not really that much of an overhead as such - more so I would suggest that the main tuning factor is "distance to the data". A mechanical drive has a latency way higher than an SSD and assuming one is using Sata III, a higher number of IOPs.
Hence my feeling is probably an SSD to see what kind of improvement can be gained and at least that can be taken to any new system.
I don't know what the size of the database is, but you could consider an experiment using either an SDHC card or a USB memory stick (in a USB slot) since both are effectively SSDs (just in a slightly slower package). I don't know anything about the PI, but I am wondering if it is possible to install Linux on a USB memory stick and store your DB on an SDHC card - giving the ability to remove the normal HD from the system - at least it might reduce power a bit.
Yes, SD cards and USB sticks are SSDs. But they often have terrible performance. Just because you can write a photo to one quickly (a nice big sequential write) doesn't mean using it as your OS drive, let along the backing store for a database, will be a good idea. Try a USB hard drive, or better still, a "real" SSD in a USB enclosure.
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...
TwoSeven:deadlyllama:TwoSeven:
MySQL isn't really the issue I don't think - given the memory foot print. Your current device appears by the description to be I/O constrained - I suspect better performance might be achieved by replacing the HD with an SSD and run a larger swap file. On top of this one can increase the memory aperture (its a technical way of saying out more ram in).
The query engine in a database is not really that much of an overhead as such - more so I would suggest that the main tuning factor is "distance to the data". A mechanical drive has a latency way higher than an SSD and assuming one is using Sata III, a higher number of IOPs.
Hence my feeling is probably an SSD to see what kind of improvement can be gained and at least that can be taken to any new system.
I don't know what the size of the database is, but you could consider an experiment using either an SDHC card or a USB memory stick (in a USB slot) since both are effectively SSDs (just in a slightly slower package). I don't know anything about the PI, but I am wondering if it is possible to install Linux on a USB memory stick and store your DB on an SDHC card - giving the ability to remove the normal HD from the system - at least it might reduce power a bit.
Yes, SD cards and USB sticks are SSDs. But they often have terrible performance. Just because you can write a photo to one quickly (a nice big sequential write) doesn't mean using it as your OS drive, let along the backing store for a database, will be a good idea. Try a USB hard drive, or better still, a "real" SSD in a USB enclosure.
The original premise is to reduce power consumption and eek out more performance. Using the mico-drives is the lowest cost way of achieving this (to see if it works) before committing money to buying the uprated hardware, considering many people have an USB drive/SD card already. Basically what I am suggesting is test the architecture first before scaling it up.
But most USB flash sticks and SD cards have terrible performance -- in fact, KiwiPower's current setup is probably using a slow SD card as his filesystem. Swapping one slow drive for another will not eke out any more performance, all it will do is mean you own two slow flash devices rather than one.
Here's a helpful article on the [url=performance characteristics of cheap flash drives The Raspberry Pi people themselves have run into this problem, which is why the NOOBS SD cards they sell are specially selected to have good random write performance, even though they're "class 4". The Samsung SD cards are supposed to be better than most for this sort of thing but they're hard to impossible to buy in NZ.
ubergeeknz: Can attest to this, I have a couple of Samsung 32Gb microSD class 6 and the write performance is phenomenal. You can buy them from dx.com... I haven't tested them with a Pi though
Also it seems like the Pi is being CPU constrained; but have you looked in top to see what the io wait % is?
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...
|
![]() ![]() ![]() |