Re: remote mysql is too slow



On Wed, Apr 11, 2012 at 07:18:18AM +0100, Bob Proulx wrote:
Karl E. Jorgensen wrote:
Jumping back in (late) in this thread...
Bob Proulx wrote:
# free -m
total used free shared buffers cached
Mem: 7986 7913 73 0 224 6133
-/+ buffers/cache: 1554 6431
Swap: 3813 0 3813

Shows 8G of ram. Good. Shows no swap used. Also good. (But not
necessarily bad if some swap is used. So if you see some swap being
used that isn't necessarily a problem.)

Mostly good. Yes. But 6133 Mb Cached is not what I would expect - this
indicates that the linux kernel is doing the caching - rather than
MySQL. And the MySQL cache for this stuff is (almost) always more
efficient.

But at some point the daemon is going to need to write a file to disk.
That data will get cached at that time. Or are you saying that mysql
is using or should using O_DIRECT and avoid the cache explicitly?

No - although that might help (marginally) too. The point is that
caching of data in MySQL will be more efficient than caching in the
kernel disk cache; less layers and whatnot.

--
Karl E. Jorgensen
IT Operations


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: 20120411145523.GE30103@hawking">http://lists.debian.org/20120411145523.GE30103@hawking



Relevant Pages

  • Re: the size of the free physical memory
    ... > All unices use physical memory for IO Caching or other caching. ... > A good cache size will have a goot hit rate, ... I described how HP-UX manages physical memory. ... > The memory seems to be used more because HP-UX uses pseudo swap, ...
    (comp.sys.hp.hpux)
  • Re: the size of the free physical memory
    ... All unices use physical memory for IO Caching or other caching. ... A good cache size will have a goot hit rate, ... The memory seems to be used more because HP-UX uses pseudo swap, ...
    (comp.sys.hp.hpux)
  • Re: Is Greenspun enough?
    ... Most OSes memory map executables directly from the file system so code doesn't pollute the file cache or swap space. ...
    (comp.lang.lisp)
  • Re: Is Greenspun enough?
    ... Most OSes memory map executables directly from the file ... >> system so code doesn't pollute the file cache or swap space. ... but executables have a twist. ...
    (comp.lang.lisp)
  • Re: Install Debian on SD
    ... by setting it low say that they never want to swap. ... If that means using ram for file system buffer cache ... the LD_PRELOAD library to disable fsync(). ... I think disabling fsync() had more positive performance effect than ...
    (Debian-User)