PDA

View Full Version : pconnect or connect?


shri
Sun 12th Nov '00, 2:44am
Hi folks,

Are there any performance or memory implications on using either pconnect or connect to establish the connection to the mysql server?

From what I recall the overhead is minimal in terms of establishing the connection when the mysql server is local (on the same host) to the webserver.

However, are there any caching implications?

I'm running about 100 concurrent sessions on a 256MB P500 right now and looking at getting that extra bump in performance if at all possible.

MY.CNF settings
-------
ort = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
set-variable = key_buffer=16M
set-variable = max_allowed_packet=1M
set-variable = table_cache=64
set-variable = sort_buffer=512K
set-variable = net_buffer_length=8K
set-variable = myisam_sort_buffer_size=8M
log-update
-------

Extended Status
------

+--------------------------+------------+
| Variable_name | Value |
+--------------------------+------------+
| Aborted_clients | 298 |
| Aborted_connects | 4 |
| Bytes_received | 1051345678 |
| Bytes_sent | 3263362252 |
| Connections | 597414 |
| Created_tmp_disk_tables | 0 |
| Created_tmp_tables | 248191 |
| Delayed_insert_threads | 1 |
| Delayed_writes | 12328 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_delete | 297042 |
| Handler_read_first | 66064 |
| Handler_read_key | 17660875 |
| Handler_read_next | 221462491 |
| Handler_read_prev | 958558 |
| Handler_read_rnd | 15466583 |
| Handler_read_rnd_next | 504059065 |
| Handler_update | 463042 |
| Handler_write | 6697607 |
| Key_blocks_used | 15127 |
| Key_read_requests | 45996558 |
| Key_reads | 14638 |
| Key_write_requests | 1147912 |
| Key_writes | 755655 |
| Max_used_connections | 28 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 63 |
| Open_files | 118 |
| Open_streams | 1 |
| Opened_tables | 3517 |
| Questions | 8881863 |
| Select_full_join | 221772 |
| Select_full_range_join | 0 |
| Select_range | 224822 |
| Select_range_check | 0 |
| Select_scan | 2327720 |
| Slave_running | OFF |
| Slow_launch_threads | 2 |
| Slow_queries | 59 |
| Sort_range | 486535 |
| Sort_rows | 16454288 |
| Sort_scan | 588021 |
| Threads_cached | 0 |
| Threads_connected | 6 |
| Threads_running | 1 |
| Uptime | 916427 |
+--------------------------+------------+


Status
-----
Uptime: 916491 Threads: 6 Questions: 8882535 Slow queries: 59 Opens: 3517 Flush tables: 1 Open tables: 63 Queries per second avg: 9.692
----