Why everytime "IO#flush" take so long?

Hi,

I have question, on production site.(It is not happening on development
site)
The used memory resources at the production server stand at 50% to 60%

Every request to the main homepage take very long (6 -10 seconds for
IO#flush. Do you guys know what is “IO#flush” doing? how to reduce the
load time?

Rendering within layouts/site
Rendering site/index
Completed in 6.31200 (0 reqs/sec) | Rendering: 0.40600 (6%) | DB:
5.43800 (86%) | 200 OK [http://www.domain.com/]
[http://www.domain.com/]

Thread ID: 67783920
Total: 6.313

%self total self wait child calls name
81.69 5.16 5.16 0.00 0.00 4 IO#flush
3.45 0.22 0.22 0.00 0.00 50
ActiveRecord::Associations::AssociationCollection#reset
1.25 0.14 0.08 0.00 0.06 8575 Mysql#get_length

Thank you in advance