Low Memory Machine Completes Large Table Alters In Much Less Time - mysql

I have two database servers.
Server A has 128GB memory with 75% for buffer_pool
Server B has 64GB memory with 25% for buffer_pool
There is no activity on Server A but an ALTER on a 220 GB table.
There is replication activity on Server B on ALTER on same 220 GB table.
Server B completes in half the time.
Can someone explain what might cause this behavior? All settings across Server A and B are similar except for memory and buffer_pool alotments.
Both are identical OS and Server A has 16 core CPU, while Server B has 8 core.

Not everything is main memory, in my case, factors like OS and CPU make a big difference. I tested same DB in different machines (for a project I worked on), and found a better general performance in a Linux i5-6200U and 8gb DDR4 machine than a W7 i7-4000 and 16gb DDR3 (around a 20% better performance)

Related

Does a MySQL database run faster on Windows server or Windows 10?

I was wondering if a MySQL database run faster on Windows server 2019 or on Windows 10.
Are the performance based on the operating system or just on the installed hardware?
The only significant differences are
HDD (slower) or SSD (faster)
Network latency (now close are the client and server)
Other things:
CPU -- Today's CPUs don't have much range in speed. And most queries are fast enough that a CPU speed difference is usually not noticeable
CPU cores -- See CPU.
RAID with hardware write cache -- Beneficial for heavy write situations.
OS -- Only if you have very little I/O and network latency might you even be able to measure an OS speed difference.

Apache and MySQL installation on VPS

Is there any difference (or preference) between two schemes:
Apache & MySQL are installed on the same VPS (4Gb RAM, 2 CPU Cores) and each of them configured for 2GB RAM,
Apache and MySQL installed on separate VPS (2Gb RAM, 1 CPU Core).
Thank you.
It is better to go for separate vps server
Following are the reason
1) can boost performance, u can balance the load equally
2) easier to set up replication if you have separate standalone DB server
3) easier to trouble shoot if there is a problem either in apache or mysql
4) normally if you have separate DB instance, you will allocate 80% of your RAM memory to Myisam or Innodb engine for better concurrency. If both kept in same vps, u will have to sacrifice concurrency, scalability

Servers compare, to run BIG MySql DB

I have an question about this 2 dedicated servers,...
WATH is BETTER to run an website with an large MySql Data Base (4 - 6 GB)
------My actual server-------
Intel Xeon E5-1650v2 - 6c/12t - 3,5 / 3,8 GHz
Ram: 128 GB
Memory: DDR3 ECC 2133 MHz
Disks: 3x600GB SAS HARD + Cache 80Go SSD
------I want to change to this server----------
Intel Xeon 2x E5-2630v3 - 16c/32t - 2,4 / 3,2 GHz
Ram: 128 GB
Memory: DDR4 ECC 1866 MHz
Disks: 2x480GB SSD SOFT
Of corse, the second server, have beeter procesor, better memory... but the disks?
About my website:
Is an very light web, dont use images, videos,... I dont have big files, and is developed with laravel and run in cPanel (centOS)
The problem is the DB, becouse all content (for example, images) are requested from external websites, and all this routes are stored in the DB. So, for now, my DB have 4GB, but in the next monts, can have 6GB.
I need an very fast server for the DB.
MANY THANKS.
Your database should rock on either of those specs. Your entire database can fit in RAM and that will definitely make your web app/DB very responsive. Your database is really not large. 6 GB these days for a DB is small-to-medium size.
I'd go the SSD right. If you can, go with RAID-1 for data protection.

mysql server overload due to many queries at once

I have an application on my server that uses many database requests to a reasonable simple and small database (10Mb size).
The number of simultaneous requests can be around 500. I have an Apache & Mysql server running on linux with 8GB RAM and 3 cores.
I've upgraded the server recently(from 512mb to 8GB), but this is not having effect. It seems that the aditional CPU and RAM is not being used. Before the CPU hit 100%, but after the upgrade I still get status WARN at only 40% CPU usage:
Free RAM: 6736.94 MB
Free Swap: 1023.94 MB
Disk i/o: 194 io/s
In the processes, the mysqld cpu usage is 100%.
I can't figure out what the right settings are to make the hardware upgrade work for mysql and MyISAM engine.
I have little experience with setting up and configuring a server, so detailed comments or help are very welcome.
UPDATE #1
the mysql requests are both readers and writers from a large number of php scripts.

MySQL Heap/Memory based table

I have a server with 12GB RAM, and max_heap_table_size in my.cnf is set to 6GB. ("max_heap_table_size=6442450944"). I restarted the MySQL server after setting this.
The trouble is, whenever my table gets to just 2GB during inserts I get error "table full". Why is it not letting me add more than 2GB worth of data? (The 2GB figure is what is shown as the size in phpMyAdmin)
A 32 bit MySQL server (or any 32 bit application for that matter) only have 2-3Gb(Depending on the OS, etc.) of virtual memory available, and thus can't address more memory. You need a 64 bit OS, and a 64 bit MySQL server to take advantage of more memory.