[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gluster-devel] Unix/socket
From: |
Tomáš Siegl |
Subject: |
Re: [Gluster-devel] Unix/socket |
Date: |
Tue, 2 Sep 2008 09:51:01 +0200 |
Gordan
I'm testing single process configuration for Server and Client on same
machine with communication using file unix socket, just to get a
picture how big is gluster overhead.
Previous patch enables to set-up gluster communication using file unix
socket. Gluster's configuration file check won't let you set up either
server or client to listen / bind to local unix file socket now. This
is purpose of my patch, not running single process this is another
story.
I will attach here my config file so you can see that gluster is able
to run without process context switching overhead between server &
client on the same machine.
Here is my config file:
volume storage
type storage/posix
option directory /tmp/gluster
end-volume
volume plock
type features/posix-locks
option mandatory on
subvolumes storage
end-volume
volume wb
type performance/write-behind
subvolumes plock
end-volume
volume ra
type performance/read-ahead
subvolumes wb
end-volume
volume iocache
type performance/io-cache
option cache-size 64MB # default is 32MB
option page-size 1MB #128KB is default option
option force-revalidate-timeout 2 # default is 1
subvolumes ra
end-volume
volume brick1
type performance/io-threads
subvolumes iocache
option thread-count 4
end-volume
volume server
type protocol/server
option transport-type socket
option address-family unix
option bind-address /tmp/gluster-socket
option listen-path /tmp/gluster-socket
subvolumes brick1
option auth.addr.brick1.allow *
end-volume
volume client
type protocol/client
option transport-type socket
option address-family unix
option remote-host /tmp/gluster-socket
option connect-path /tmp/gluster-socket
option remote-subvolume brick1
end-volume
gluster started by commnad:
glusterfs -f setup.vol -l gluster.log /mnt/gluster
Maybe I don't understand what is your problem with single file configuration.
Regards
Tomas
Ps: I'm on IRC #gluster. My nick is SigiTS.
On Mon, Sep 1, 2008 at 7:23 PM, Gordan Bobic <address@hidden> wrote:
> Would it not be better to instead fix the single-file client / local server
> problems? I was looking for a UNIX socket method a while back, but this
> still requires a client-server process switch which is expensive, but I had
> unpredictable failures with the single-file setup.
>
> Gordan
>
> Tomáš Siegl wrote:
>>
>> Hello
>>
>> today I would like to test gluster using local unix socket (client and
>> server on the same machine) and I had to modify
>> source codes because there are option check on
>> glusterfs--mainline-3.0--Patch-350 which is needed in
>> transport/socket/src/name.c
>>
>> Here is my patch, there is no doc/translator-option.txt patch here,
>>
>> May be you will find other solution probably change it in file
>> transport/socket/src/name.c
>> function af_unix_server_get_local_sockaddr and
>> af_unix_server_get_local_sockaddr.
>>
>> regards
>> Tomas Siegl
>>
>> --- orig/xlators/protocol/client/src/client-protocol.c
>> +++ mod/xlators/protocol/client/src/client-protocol.c
>> @@ -4775,6 +4775,9 @@
>> { "remote-host", GF_OPTION_TYPE_STR, 1, 0, 0 },
>> { "non-blocking-io", GF_OPTION_TYPE_STR, 1, 0, 0 },
>>
>> + /* Socket */
>> + { "connect-path", GF_OPTION_TYPE_STR, 1, 0, 0 },
>> +
>> /* Client protocol itself */
>> { "limits.transaction-size", GF_OPTION_TYPE_SIZET, 1, 128 *
>> GF_UNIT_KB, 8 * GF_UNIT_MB },
>> { "remote-subvolume", GF_OPTION_TYPE_STR, 1, 0, 0 },
>>
>>
>> --- orig/xlators/protocol/server/src/server-protocol.c
>> +++ mod/xlators/protocol/server/src/server-protocol.c
>> @@ -6429,6 +6429,9 @@
>> { "address-family", GF_OPTION_TYPE_STR, 1, 0, 0 },
>> { "bind-address", GF_OPTION_TYPE_STR, 1, 0, 0 },
>>
>> + /* Socket */
>> + { "listen-path", GF_OPTION_TYPE_STR, 1, 0, 0 },
>> +
>> /* Server protocol itself */
>> { "limits.transaction-size", GF_OPTION_TYPE_SIZET, 1, 128 *
>> GF_UNIT_KB, 8 * GF_UNIT_MB },
>> { "client-volume-filename", GF_OPTION_TYPE_STR, 1, 0, 0 },
>>
>>
>> _______________________________________________
>> Gluster-devel mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/gluster-devel
>
>
>
> _______________________________________________
> Gluster-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/gluster-devel
>