This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygserver - Postgres Multiple connection Load Testing - Inifinte Loop


On Mar 25 09:09, Marco Atzeri wrote:
> On 24/03/2017 18:11, Corinna Vinschen wrote:
> > Hi Noah,
> > 
> 
> > > 
> > > On GNU/Linux, AIX, and Solaris, the processes keep busy and finish one million
> > > lock/unlock cycles apiece in a few minutes.  On Cygwin, they hang within a few
> > > seconds and under one hundred cycles apiece.  At that point, cygserver is
> > > unresponsive to other clients; for example, "strace /bin/true", opening a new
> > > Cygwin terminal, "cat /proc/sysvipc/sem" and "cygserver -S" all hang.  In most
> > > tests, cygserver was not consuming CPU while unresponsive.
> > 
> > 
> > I pushed a patchset now, and uploaded new developer snapshots for
> > testing to https://cygwin.com/snapshots/
> > 
> > I'm also going to create a 2.8.0-0.4 test release later today.
> > 
> > Please give it a try, and please note that *all* patches affect
> > cygserver itself, so you have to test the new cygserver in the
> > first place.  The Cygwin DLL is not affected by the changes.
> > 
> > 
> > Thanks,
> > Corinna
> > 
> 
> Hi Corinna,
> just noted a small glitch.
> 
> Attached a modification of Noah's test, it now accepts the number of workers
> and semaphore are as before workers/4
> 
> ./sema_parallel-2 32
>  worker ....
>  OK
> 
> ./sema_parallel-2 64
> semget
> semget: Invalid argument
> 
> If I restart the cygserver
> 
> ./sema_parallel-2 64
>  worker ....
>  OK
> 
> ./sema_parallel-2 128
> semget
> semget: Invalid argument
> 
> 
> It seems that the number of max available semaphores is frozen to first call
> value.

That's normal and documented.  An existing semaphore set using the same
key has the number of semaphores defined in the first call, until you
remove the semaphore set with, for instance, ipcrm -s.  POSIX has this
to say:

   [EINVAL]
      The value of nsems is either less than or equal to 0 or greater
      than the system-imposed limit, or a semaphore identifier exists
      for the argument key, but the number of semaphores in the set
      associated with it is less than nsems and nsems is not equal to 0.

Linux doesn't care, but BSD does, and our XSI IPC code is 95% BSD.


Corinna

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]