I want to rent a dedicated server. It will have several databases for web applications (PHP + MySQL).

Suppose the total database will occupy almost the entire space (~ 500GB). MySQL will process many queries to these databases, and the sample from the database is random (that is, records from different areas of the disk will be affected).

How would it be better in terms of performance: order one SSD of 512GB in size, or order two 256GB SSDs and merge them into RAID-0?

  • In the second case (256x2 RAID-0) you will double the chance of data loss - Victor Pupkin
  • In terms of performance, of course, RAID-0 is better. But why do you need it? As you know, all system components must be balanced. In your case, this means that the performance of the communication channel should be comparable to the performance of the disk subsystem. If the SSD RAID-0 is locally, then you can still hope that the performance of SATA is comparable to the performance of the disk itself. And if this is a remote server, do you really have a channel to disk so wide that the performance of the channel is at least equal to the performance of a single SSD 512? In general, consider the performance. - pepsicoca1
  • So the server will be dedicated. DDR4 memory, I7-7700 processor. It seems that the communication channel with ssd will be sufficient - Ruport
  • [It is thought that the communication channel with ssd will be sufficient] There is no need to think, then you need to find out from the provider what width of the communication channel and compare this communication channel with the performance of SSD and SSD RAID-0. And also to take into account that often providers promise one thing, but in fact they have a channel like a dial-up of 56 kilobits. And another thing: SSD reading is much faster than writing. If you have a read from the server, then you should compare the SSD read speed with the speed of the channel. However, if you have a lot of writing to disk, then SSD is not recommended. In SSD, the final resource is by writing and you will be quickly filmed to death. - pepsicoca1
  • one
    Yes, precisely, the communication channel with the outside world. The performance of this channel should be comparable to the performance of the disk subsystem. If the channel is less productive than the disk, then you have overpaid for the disk. If the channel is more productive than the disk, then you have overpaid for the channel. And all this should correspond to the flow of requests. If you have a wide channel but only three requests per day, then you have overpaid for the disk and for the channel. If you have 100,500 requests per day and a narrow channel, it means your site will slow down and lag. - pepsicoca1

1 answer 1

Do you mean a channel of communication with the "outside world"? 100mbit warranty / 1gbit shared

Well, now we look at the performance of SSD drives.

60 GB SSD DEXP S1 [SATA III, reading - 300 MB / s, writing - 270 MB / s, Phison S3111-S11, MLC 2D NAND]

60 GB SSD AFOX AFSN8T3BN60G [SATA III, read - 400 MB / s, write - 260 MB / s, Silicon Motion SM2258XT, TLC 3D NAND]

120 GB SSD Smartbuy Splash 3 [SB120GB-SPLH3-25SAT3] [SATA III, reading - 550 MB / s, writing - 450 MB / s, Marvell 88NV1120, TLC 3D NAND]

Reading 300 MB / s is roughly 3000 Mbit / s. That is 3Gb / s. Three times more than what the provider offers you at the peak of productivity (and even when he gives you this, he may never say that "there is no technical possibility"). Yes, and "100 Mbit warranty" often in practice means 50 Mbit maximum. That is, you have no reason to set up RAID-0, since the performance of a single disk is much more than the performance of your channel.

UPD1:

According to write cycles, it is expected around 2-5 million updates per day.

It depends on the size of the record. But in general, the rule is:

  1. If you have a project like a library, when you upload information to the server once, and then users only read it, then you can install an SSD drive (provided that the read streams are so large and the communication channel is so wide that it slows down the performance of the drive) .

  2. If you have a project like youtube or an instagram, when users upload 100500 terabytes of information to your server every second, then there is no point in putting an SSD disk. You will burn it very quickly, since the SSD disk has a limit on the number of entries.

UPD2:

In general, a dedicated server is quite a binding thing. It is much easier to rent disk space and not bother with technical details. And let the provider keep track of the performance balance, redundancy and RAID. The main thing is to choose a normal large provider with normal technical support, and not pioneers from the basement. However, now there are no pioneers left, they have eaten everyone.

UPD3:

write as if any movement from the disk flies back to the user over the network. If the subd will need to read the entire table by half the size of the disk size c, and return 100 records, this does not require passing all 500 meters across the network, right? - teran 1 minute ago

Well, it is necessary to watch. If you have a search database (such as ticket sales), then local disk performance may be important. But still, the balance of query performance over the network and the performance of the disk subsystem has not been canceled.

  • write as if any movement from the disk flies back to the user over the network. If the subd will need to read the entire table by half the size of the disk size c, and return 100 records, this does not require passing all 500 meters across the network, right? - teran
  • Thank you. I chose the option with one SSD. And there I will measure the performance, suit or not. - Ruport
  • @Ruport planning ahead is difficult. The reason is that man is a clever creature and will always find a way to shame a stupid piece of iron. I saw sites with which the formation of the main page took about ten seconds, and all this time the car spent picking at the database, and then gave out a page of five hundred kilobytes, taking into account the pictures. And not because the calculations are complicated, but because the hands are crooked. That is, see: if you have less than a hundred HTTP requests per second, and at the same time everything runs into the base, then, most likely, the problem is not in the database and not in the disks. - Alexander Prokoshev