R
Railwayβ€’3mo ago
NuckFuggets

Is it possible to change the default config of a Mysql Container?

By default the container uses up a minimum of 500mb of ram, I found a stack overflow post on how to reduce this initial RAM allocation. Is there an easy way to change the config from within Railway or should I create a custom docker image? https://stackoverflow.com/questions/10676753/reducing-memory-consumption-of-mysql-on-ubuntuaws-micro-instance
Stack Overflow
Reducing memory consumption of mysql on ubuntu@aws micro instance
I have recently started on a PoC project wherein we are developing a small web app. The initial setup is done on a micro instance from AWS. We are on rails+mysql stack. After installing/running My...
Solution:
easy enough, simply append --performance_schema=0 to the start command, doing so dropped my idle memory of a freshly deployed mysql database from 490MB to 177MB
Jump to solution
27 Replies
Percy
Percyβ€’3mo ago
Project ID: N/A
NuckFuggets
NuckFuggetsβ€’3mo ago
N/A
Brody
Brodyβ€’3mo ago
very interesting findings, I will definitely look for a way to apply these settings to a mysql database on railway!
Solution
Brody
Brodyβ€’3mo ago
easy enough, simply append --performance_schema=0 to the start command, doing so dropped my idle memory of a freshly deployed mysql database from 490MB to 177MB
NuckFuggets
NuckFuggetsβ€’3mo ago
@Brody Legend thanks a lot! 😁
Brody
Brodyβ€’3mo ago
no problem!
CookieMonzteh
CookieMonztehβ€’3mo ago
Testing this out for myself
Melissa
Melissaβ€’3mo ago
nice Brody! wonder if we should add this to the template
CookieMonzteh
CookieMonztehβ€’3mo ago
I get this when i added that to my start command... i must be putting it in the wrong place
CookieMonzteh
CookieMonztehβ€’3mo ago
No description
CookieMonzteh
CookieMonztehβ€’3mo ago
No description
Melissa
Melissaβ€’3mo ago
prob need to put it at the end
CookieMonzteh
CookieMonztehβ€’3mo ago
yep, didnt crash now i need to wait like an hour or something to see if it drops
Brody
Brodyβ€’3mo ago
it might be worth it, the extra memory is used for database monitoring that i dont even think you could utilize on railway https://dev.mysql.com/doc/refman/8.0/en/performance-schema.html
CookieMonzteh
CookieMonztehβ€’3mo ago
good god
CookieMonzteh
CookieMonztehβ€’3mo ago
No description
CookieMonzteh
CookieMonztehβ€’3mo ago
Brody the wizard strikes again
Brody
Brodyβ€’3mo ago
this also would allow trial plan users to run the mysql databases
CookieMonzteh
CookieMonztehβ€’3mo ago
thats so odd, i wonder what else could be turned of now lol
Brody
Brodyβ€’3mo ago
im sure there are other things, don't know if they could be tweaked via cli flags though
CookieMonzteh
CookieMonztehβ€’3mo ago
after deleting the other project i wasnt even using and this according to my calculations at least while idle right now it should be 3.96, Ill add making dominican sazon to the list of stuff to give / teach you πŸ˜‚ , thanks again brody
Brody
Brodyβ€’3mo ago
happy to help πŸ™‚
Linear
Linearβ€’3mo ago
Issue LOG-1581 created.
LOG-1581 - add performance_schema to mySql start command
Status
Triage
Assignee
Melissa Hale
Logistics
CookieMonzteh
CookieMonztehβ€’3mo ago
whats this? πŸ€”
Brody
Brodyβ€’3mo ago
their internal system to track tasks and such
CookieMonzteh
CookieMonztehβ€’3mo ago
ah I thought it was some railway feature
Brody
Brodyβ€’3mo ago
haha not quite