Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6730879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:27:42+00:00 2026-05-26T10:27:42+00:00

I’m moving from a shared web hosting company to a VPS. And I’m trying

  • 0

I’m moving from a shared web hosting company to a VPS. And I’m trying to find the optimum configuration for my system.

For 1 specific table with half a million record, 1 query that was taking few seconds on the previous server is now taking minutes.

I’m trying to improve the response time of my server, so I bought more memory (I have 2GB of RAM, and I can still buy more resources if needed and 2 cores). I have also “cheated” by copying my.cnf of the old company to my VPS:

[mysqld]
read_buffer_size=8M
read_rnd_buffer_size=8M
sort_buffer_size=32M
innodb_additional_mem_pool_size=503M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=16M
innodb_buffer_pool_size=1007M
innodb_log_file_size=256M
innodb_thread_concurrency=8
innodb_autoextend_increment=128
max_connections=8059
max_user_connections=50
thread_cache_size=128
thread_stack=196608
binlog_cache_size=2M
net_read_timeout=30
net_retry_count=10
net_write_timeout=30
thread_concurrency=10
open_files_limit=9940
max_heap_table_size=32M
tmp_table_size=64M
key_buffer_size=512M
key_buffer=128M
myisam_sort_buffer_size=64M
join_buffer=16M
record_buffer=8M
wait_timeout=300
connect_timeout=10
max_allowed_packet=16M
max_connect_errors=100
table_cache=1024
query_cache_size=32M
query_cache_type=1
ft_min_word_len=4
datadir=/var/lib/mysql
tmpdir=/tmp
socket=/var/lib/mysql/mysql.sock
old-passwords=0
[mysqldump]
quick
max_allowed_packet=16M
[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

The problem is that the query is still slow, and the server does not use the available memory!

              total       used       free     shared    buffers     cached
Mem:          2002       1986         15          0          6       1079
-/+ buffers/cache:        901       1101
Swap:         1747          2       1745

Any suggestions?

Regards

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:27:43+00:00Added an answer on May 26, 2026 at 10:27 am

    You can have a look at using
    https://github.com/rackerhacker/MySQLTuner-perl

    Which you can use to analyse MySQL and it will output recommended settings.

    Your settings seem way high for 2gb memory.
    IE max_connections=8059
    That in its self would require way more memory than you have.

    [mysqld]
    max_connections=100
    innodb_buffer_pool_size=256M
    query_cache_size=256M
    key_buffer_size=256M
    innodb_flush_log_at_trx_commit=0
    innodb_flush_method=O_DIRECT
    query_cache_type=1
    query_cache_limit=2M
    table_cache=1024
    join_buffer_size=4M
    thread_cache_size=128
    tmp_table_size=256M
    max_heap_table_size=256MB
    

    For 2gb RAM you could try using these settings in MySQL
    These are the recommended settings for one of the 2gb servers I am currently using

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.