SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2003
    Location
    Chile
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Questions about limits

    I have 256 databases with around 30k tables in them (running a bloggind service). I've been using tuning-primer.sh for sometime now and I've been trying to edit some settings as recommended.

    So far so good, except 2 limits that are being ignored.

    Open_files_limit is stuck at 65535, no matter what I set it in my.cnf
    Table cache is stuck at 32712, no matter what number I try to set higher that that.

    I am using CentOS 5.2 64bit, with WHM/Cpanel. Using Mysql 5 and PHP 5.

    I've tried using ulimit -n, but once I logout it resets back to 1024. What am I doing wrong? Or how should I be setting this?

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    i would post this question on a linux-specific forum. the limit you're running in to is a limitation in your kernel. you'll probably have to compile a new kernel with a higher limit on maximum number of files open.
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2003
    Location
    Chile
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm going to bump this, but ask a different question. Is it advised to have so many files open? I mean, is the value I have too high? The server I have is not that bad and I believe it could handle more...but since the default value is so low I am not sure that setting it to 100x original value is such a good idea.

  4. #4
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    the fact that you have so many tables is bad design to begin with. are you running wordpress multiuser?
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast

  5. #5
    SitePoint Zealot
    Join Date
    Aug 2003
    Location
    Chile
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I am using wpmu. What can I do about the table cache in this case? I mean, this number will just keep increasing.

  6. #6
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,350
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    30k tables????

    why that many?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  7. #7
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    wordpress has 30+ tables. wordpress multiuser allows multiple blog instances on a single server by creating a whole set of tables per user.

    i would argue that this is a design flaw. you're not going to be able to increase the number of system file handles any further. at least not with advice you're going to get here.

    if you want to keep going that direction, i suggest asking on a centos-specific forum.
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast

  8. #8
    SitePoint Zealot
    Join Date
    Aug 2003
    Location
    Chile
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    30k tables because each blog gets its own 8 tables.

  9. #9
    SitePoint Zealot
    Join Date
    Aug 2003
    Location
    Chile
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am going to bump my own thread because I have another question related to this.

    Since I have over 38k tables and there is nothing I can do about that, I'd like to know whats a reasonable number to set the table_cache to? I use tuning-primer.sh script and it always tells me to increase the table_cache, but I dont know if I should. Right now I set it to 20k.

  10. #10
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    ultimately, you're still going to be limited by you system-imposed file handle limit. i would suggest something in the 20-30 k range.

    a better idea might be to split your tables among multiple servers. you could write a mysql proxy script that uses a lookup table so that it knows which databases/tables are on which server and routes the connection appropriately.
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast

  11. #11
    SitePoint Zealot
    Join Date
    Aug 2003
    Location
    Chile
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Once the site grows a little more and I can actually afford to use several servers I will be doing that.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •